mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-10-12 19:44:03 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b48494cb96 | ||
|
|
98c12bebff | ||
|
|
801dba1ba8 | ||
|
|
4eb24a8d7b | ||
|
|
5c0c2390b2 | ||
|
|
b55b4b6d68 | ||
|
|
4dc95b563c | ||
|
|
31b700304a | ||
|
|
ddb674a9b9 | ||
|
|
abde6021e8 | ||
|
|
ad8614907c | ||
|
|
8974dcda6e | ||
|
|
6d4c64a575 | ||
|
|
68adf9ecc9 | ||
|
|
3df0103a8c | ||
|
|
8d720748c1 | ||
|
|
578f38f6a5 | ||
|
|
280454fdb0 | ||
|
|
0711e236c0 | ||
|
|
b9c5edddef | ||
|
|
3c6a0d12f5 | ||
|
|
583f662a87 | ||
|
|
3f114ac76c | ||
|
|
4b2221d374 | ||
|
|
c2e224ebf8 | ||
|
|
0dc4c4fe67 | ||
|
|
9221a0ca3a | ||
|
|
b3a7e32a08 | ||
|
|
1fa0e2a0f9 | ||
|
|
9d8b073ca5 | ||
|
|
03bdf30d0a | ||
|
|
6e15cc5fa3 | ||
|
|
9d26550264 | ||
|
|
7ffde1e8fc | ||
|
|
30d234d71e | ||
|
|
a75104f13d | ||
|
|
73d3180d20 | ||
|
|
f51be309a0 | ||
|
|
a7a424cf27 | ||
|
|
19dc67eb47 | ||
|
|
9869f3125f | ||
|
|
8a8efc0dcf | ||
|
|
54e1f2a124 | ||
|
|
f827e96e1a | ||
|
|
5835fb832c | ||
|
|
9484275ab6 | ||
|
|
2a0ccb88bb | ||
|
|
d3eb327f63 | ||
|
|
c122bcd45b | ||
|
|
16b6cf6edb | ||
|
|
325bc3349e | ||
|
|
7416477763 | ||
|
|
bcd8c8f77d | ||
|
|
d44432ed81 | ||
|
|
d46f5d4353 | ||
|
|
27ded2add8 | ||
|
|
9b0bfaf079 | ||
|
|
522d61d7e2 | ||
|
|
8550e99463 | ||
|
|
2f6deb72b3 | ||
|
|
10941746e4 | ||
|
|
4827b0e6de | ||
|
|
f10085f552 | ||
|
|
eb7f0887bf | ||
|
|
34a9132d60 | ||
|
|
24d3fb000a | ||
|
|
b7b6adaff7 | ||
|
|
85ed72802f | ||
|
|
e1fcb19b23 | ||
|
|
2df69bcdea | ||
|
|
454b443b81 | ||
|
|
f97704764a | ||
|
|
9ef23038ab | ||
|
|
e48c38f47a | ||
|
|
cf64d102de | ||
|
|
2716c68c7a | ||
|
|
f54f8c83e7 | ||
|
|
124bfdf418 | ||
|
|
01507d9995 | ||
|
|
070c82bc44 | ||
|
|
17df15293f | ||
|
|
6551076613 | ||
|
|
1b1b100e63 | ||
|
|
d73b9e16da | ||
|
|
cc788e4410 | ||
|
|
e70014bb28 | ||
|
|
082cc84a71 | ||
|
|
2ba7f0d989 | ||
|
|
9a7381b35f | ||
|
|
613ecfff44 | ||
|
|
f638548a02 | ||
|
|
224bab68bf | ||
|
|
6aca18bd76 | ||
|
|
3c58e2fbba | ||
|
|
aaaebde05e | ||
|
|
8ff9f70bd7 | ||
|
|
523ca862b9 | ||
|
|
78b8d1e9f3 | ||
|
|
83c698b36d | ||
|
|
27fe37f221 | ||
|
|
3722106daf | ||
|
|
3ea9ef1ef2 | ||
|
|
fcd27b48b2 | ||
|
|
6ff37a17ec | ||
|
|
f2c6e9e32e | ||
|
|
dbf1b88a3d | ||
|
|
3aab9eb13b | ||
|
|
3f9f8f7b3b | ||
|
|
f7520ba40c | ||
|
|
7b13f12817 | ||
|
|
57e19d75e2 | ||
|
|
4330a223c6 | ||
|
|
69387c32ad | ||
|
|
a102ec4ee8 | ||
|
|
2a094437dd | ||
|
|
4142907376 | ||
|
|
e63dc9a93b | ||
|
|
1fe19e912e | ||
|
|
56ad48446e | ||
|
|
a18aa26985 | ||
|
|
5443cc014a | ||
|
|
7d77e1c1f2 | ||
|
|
ca82cd9752 | ||
|
|
dbd86bb861 | ||
|
|
0af56b4981 | ||
|
|
f1be5365bb | ||
|
|
c356862ac1 | ||
|
|
fc77322f59 | ||
|
|
032e944d49 | ||
|
|
0da47da8d8 | ||
|
|
ebfe843299 | ||
|
|
827d2362b7 | ||
|
|
4fa1eb4088 | ||
|
|
885b59fd52 | ||
|
|
ff5d9f72aa | ||
|
|
030bb91789 | ||
|
|
34788b2808 |
+25
-19
@@ -1,18 +1,18 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
ndkVersion "23.2.8568313"
|
||||
ndkVersion "29.0.14206865"
|
||||
|
||||
compileSdk 34
|
||||
compileSdk 37
|
||||
|
||||
namespace 'com.limelight'
|
||||
|
||||
defaultConfig {
|
||||
minSdk 16
|
||||
targetSdk 34
|
||||
minSdk 21
|
||||
targetSdk 36
|
||||
|
||||
versionName "12.0.1"
|
||||
versionCode = 312
|
||||
versionName "12.2"
|
||||
versionCode = 315
|
||||
|
||||
// Generate native debug symbols to allow Google Play to symbolicate our native crashes
|
||||
ndk.debugSymbolLevel = 'FULL'
|
||||
@@ -22,6 +22,7 @@ android {
|
||||
|
||||
buildFeatures {
|
||||
buildConfig = true
|
||||
resValues = true
|
||||
}
|
||||
|
||||
productFlavors {
|
||||
@@ -56,8 +57,9 @@ android {
|
||||
|
||||
compileOptions {
|
||||
encoding "UTF-8"
|
||||
sourceCompatibility JavaVersion.VERSION_11
|
||||
targetCompatibility JavaVersion.VERSION_11
|
||||
sourceCompatibility JavaVersion.VERSION_17
|
||||
targetCompatibility JavaVersion.VERSION_17
|
||||
coreLibraryDesugaringEnabled true
|
||||
}
|
||||
|
||||
lint {
|
||||
@@ -84,9 +86,6 @@ android {
|
||||
applicationIdSuffix ".debug"
|
||||
resValue "string", "app_label", "Moonlight (Debug)"
|
||||
resValue "string", "app_label_root", "Moonlight (Root Debug)"
|
||||
|
||||
minifyEnabled true
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
release {
|
||||
// To whomever is releasing/using an APK in release mode with
|
||||
@@ -124,7 +123,7 @@ android {
|
||||
resValue "string", "app_label_root", "Moonlight (Root)"
|
||||
|
||||
minifyEnabled true
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,15 +132,22 @@ android {
|
||||
path "src/main/jni/Android.mk"
|
||||
}
|
||||
}
|
||||
|
||||
packaging {
|
||||
resources {
|
||||
// BouncyCastle includes duplicate LICENSE.md files
|
||||
excludes += '/META-INF/*.md'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'org.bouncycastle:bcprov-jdk15on:1.70'
|
||||
implementation 'org.bouncycastle:bcpkix-jdk15on:1.70'
|
||||
implementation 'org.jcodec:jcodec:0.2.3'
|
||||
implementation 'com.squareup.okhttp3:okhttp:3.12.13'
|
||||
implementation 'com.squareup.okio:okio:1.17.5'
|
||||
// 3.5.8 requires minSdk 19, uses StandardCharsets.UTF_8 internally
|
||||
implementation 'org.jmdns:jmdns:3.5.7'
|
||||
implementation 'org.bouncycastle:bcprov-jdk18on:1.85.2'
|
||||
implementation 'org.bouncycastle:bcpkix-jdk18on:1.85'
|
||||
implementation 'org.jcodec:jcodec:0.2.5'
|
||||
implementation 'com.squareup.okhttp3:okhttp:5.5.0'
|
||||
implementation 'org.jmdns:jmdns:3.6.3'
|
||||
implementation 'com.github.cgutman:ShieldControllerExtensions:1.0.1'
|
||||
|
||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5'
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
<uses-permission android:name="android.permission.CAPTURE_KEYBOARD" />
|
||||
<uses-permission android:name="com.android.providers.tv.permission.READ_EPG_DATA"/>
|
||||
<uses-permission android:name="com.android.providers.tv.permission.WRITE_EPG_DATA"/>
|
||||
|
||||
@@ -50,7 +51,6 @@
|
||||
android:banner="@drawable/atv_banner"
|
||||
android:appCategory="game"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:roundIcon="@mipmap/ic_launcher"
|
||||
android:installLocation="auto"
|
||||
android:gwpAsanMode="always"
|
||||
android:localeConfig="@xml/locales_config"
|
||||
@@ -77,6 +77,11 @@
|
||||
<meta-data
|
||||
android:name="com.android.graphics.intervention.wm.allowDownscale"
|
||||
android:value="false"/>
|
||||
|
||||
<!-- Game Mode configuration -->
|
||||
<meta-data
|
||||
android:name="android.game_mode_config"
|
||||
android:resource="@xml/game_mode_config" />
|
||||
|
||||
<!-- Samsung DeX support requires explicit placement of android:resizeableActivity="true"
|
||||
in each activity even though it is implied by targeting API 24+ -->
|
||||
|
||||
@@ -127,6 +127,7 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
private int suppressPipRefCount = 0;
|
||||
private String pcName;
|
||||
private String appName;
|
||||
private NvApp app;
|
||||
private float desiredRefreshRate;
|
||||
|
||||
private InputCaptureProvider inputCaptureProvider;
|
||||
@@ -146,8 +147,6 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
private int requestedNotificationOverlayVisibility = View.GONE;
|
||||
private TextView performanceOverlayView;
|
||||
|
||||
private ShortcutHelper shortcutHelper;
|
||||
|
||||
private MediaCodecDecoderRenderer decoderRenderer;
|
||||
private boolean reportedCrash;
|
||||
|
||||
@@ -196,14 +195,12 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
|
||||
// If we're going to use immersive mode, we want to have
|
||||
// the entire screen
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT) {
|
||||
getWindow().getDecorView().setSystemUiVisibility(
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
|
||||
getWindow().getDecorView().setSystemUiVisibility(
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
|
||||
|
||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN);
|
||||
}
|
||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN);
|
||||
|
||||
// Listen for UI visibility events
|
||||
getWindow().getDecorView().setOnSystemUiVisibilityChangeListener(this);
|
||||
@@ -318,10 +315,11 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
int httpsPort = Game.this.getIntent().getIntExtra(EXTRA_HTTPS_PORT, 0); // 0 is treated as unknown
|
||||
int appId = Game.this.getIntent().getIntExtra(EXTRA_APP_ID, StreamConfiguration.INVALID_APP_ID);
|
||||
String uniqueId = Game.this.getIntent().getStringExtra(EXTRA_UNIQUEID);
|
||||
String uuid = Game.this.getIntent().getStringExtra(EXTRA_PC_UUID);
|
||||
boolean appSupportsHdr = Game.this.getIntent().getBooleanExtra(EXTRA_APP_HDR, false);
|
||||
byte[] derCertData = Game.this.getIntent().getByteArrayExtra(EXTRA_SERVER_CERT);
|
||||
|
||||
app = new NvApp(appName != null ? appName : "app", appId, appSupportsHdr);
|
||||
|
||||
X509Certificate serverCert = null;
|
||||
try {
|
||||
if (derCertData != null) {
|
||||
@@ -337,17 +335,6 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
return;
|
||||
}
|
||||
|
||||
// Report this shortcut being used
|
||||
ComputerDetails computer = new ComputerDetails();
|
||||
computer.name = pcName;
|
||||
computer.uuid = uuid;
|
||||
shortcutHelper = new ShortcutHelper(this);
|
||||
shortcutHelper.reportComputerShortcutUsed(computer);
|
||||
if (appName != null) {
|
||||
// This may be null if launched from the "Resume Session" PC context menu item
|
||||
shortcutHelper.reportGameLaunched(computer, new NvApp(appName, appId, appSupportsHdr));
|
||||
}
|
||||
|
||||
// Initialize the MediaCodec helper before creating the decoder
|
||||
GlPreferences glPrefs = GlPreferences.readPreferences(this);
|
||||
MediaCodecHelper.initialize(this, glPrefs.glRenderer);
|
||||
@@ -479,19 +466,16 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
.setResolution(prefConfig.width, prefConfig.height)
|
||||
.setLaunchRefreshRate(prefConfig.fps)
|
||||
.setRefreshRate(chosenFrameRate)
|
||||
.setApp(new NvApp(appName != null ? appName : "app", appId, appSupportsHdr))
|
||||
.setApp(app)
|
||||
.setBitrate(prefConfig.bitrate)
|
||||
.setEnableSops(prefConfig.enableSops)
|
||||
.enableLocalAudioPlayback(prefConfig.playHostAudio)
|
||||
.setMaxPacketSize(1392)
|
||||
.setRemoteConfiguration(StreamConfiguration.STREAM_CFG_AUTO) // NvConnection will perform LAN and VPN detection
|
||||
.setHevcBitratePercentageMultiplier(75)
|
||||
.setAv1BitratePercentageMultiplier(75)
|
||||
.setSupportedVideoFormats(supportedVideoFormats)
|
||||
.setAttachedGamepadMask(gamepadMask)
|
||||
.setClientRefreshRateX100((int)(displayRefreshRate * 100))
|
||||
.setAudioConfiguration(prefConfig.audioConfiguration)
|
||||
.setAudioEncryption(true)
|
||||
.setColorSpace(decoderRenderer.getPreferredColorSpace())
|
||||
.setColorRange(decoderRenderer.getPreferredColorRange())
|
||||
.setPersistGamepadsAfterDisconnect(!prefConfig.multiController)
|
||||
@@ -506,7 +490,6 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
keyboardTranslator = new KeyboardTranslator();
|
||||
|
||||
InputManager inputManager = (InputManager) getSystemService(Context.INPUT_SERVICE);
|
||||
inputManager.registerInputDeviceListener(controllerHandler, null);
|
||||
inputManager.registerInputDeviceListener(keyboardTranslator, null);
|
||||
|
||||
// Initialize touch contexts
|
||||
@@ -521,12 +504,6 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
}
|
||||
}
|
||||
|
||||
// Use sustained performance mode on N+ to ensure consistent
|
||||
// CPU availability
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
getWindow().setSustainedPerformanceMode(true);
|
||||
}
|
||||
|
||||
if (prefConfig.onscreenController) {
|
||||
// create virtual onscreen controller
|
||||
virtualController = new VirtualController(controllerHandler,
|
||||
@@ -581,39 +558,19 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
}
|
||||
|
||||
if (desiredOrientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
|
||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_USER_LANDSCAPE);
|
||||
}
|
||||
else {
|
||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE);
|
||||
}
|
||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_USER_LANDSCAPE);
|
||||
}
|
||||
else if (desiredOrientation == Configuration.ORIENTATION_PORTRAIT) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
|
||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT);
|
||||
}
|
||||
else {
|
||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT);
|
||||
}
|
||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT);
|
||||
}
|
||||
else {
|
||||
// If we don't have a reason to lock to portrait or landscape, allow any orientation
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
|
||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_FULL_USER);
|
||||
}
|
||||
else {
|
||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR);
|
||||
}
|
||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_FULL_USER);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// For regular displays, we always request landscape
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
|
||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_USER_LANDSCAPE);
|
||||
}
|
||||
else {
|
||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE);
|
||||
}
|
||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_USER_LANDSCAPE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -716,31 +673,38 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
}
|
||||
|
||||
public void setMetaKeyCaptureState(boolean enabled) {
|
||||
// This uses custom APIs present on some Samsung devices to allow capture of
|
||||
// meta key events while streaming.
|
||||
try {
|
||||
Class<?> semWindowManager = Class.forName("com.samsung.android.view.SemWindowManager");
|
||||
Method getInstanceMethod = semWindowManager.getMethod("getInstance");
|
||||
Object manager = getInstanceMethod.invoke(null);
|
||||
// Android has native keyboard capture support starting in API 36.1
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.BAKLAVA && Build.VERSION.SDK_INT_FULL >= Build.VERSION_CODES_FULL.BAKLAVA_1) {
|
||||
WindowManager.LayoutParams windowLayoutParams = getWindow().getAttributes();
|
||||
windowLayoutParams.setKeyboardCaptureEnabled(enabled);
|
||||
getWindow().setAttributes(windowLayoutParams);
|
||||
}
|
||||
else {
|
||||
// This uses custom APIs present on some Samsung devices to allow capture of
|
||||
// meta key events while streaming.
|
||||
try {
|
||||
Class<?> semWindowManager = Class.forName("com.samsung.android.view.SemWindowManager");
|
||||
Method getInstanceMethod = semWindowManager.getMethod("getInstance");
|
||||
Object manager = getInstanceMethod.invoke(null);
|
||||
|
||||
if (manager != null) {
|
||||
Class<?>[] parameterTypes = new Class<?>[2];
|
||||
parameterTypes[0] = ComponentName.class;
|
||||
parameterTypes[1] = boolean.class;
|
||||
Method requestMetaKeyEventMethod = semWindowManager.getDeclaredMethod("requestMetaKeyEvent", parameterTypes);
|
||||
requestMetaKeyEventMethod.invoke(manager, this.getComponentName(), enabled);
|
||||
if (manager != null) {
|
||||
Class<?>[] parameterTypes = new Class<?>[2];
|
||||
parameterTypes[0] = ComponentName.class;
|
||||
parameterTypes[1] = boolean.class;
|
||||
Method requestMetaKeyEventMethod = semWindowManager.getDeclaredMethod("requestMetaKeyEvent", parameterTypes);
|
||||
requestMetaKeyEventMethod.invoke(manager, this.getComponentName(), enabled);
|
||||
}
|
||||
else {
|
||||
LimeLog.warning("SemWindowManager.getInstance() returned null");
|
||||
}
|
||||
} catch (ClassNotFoundException ignored) {
|
||||
} catch (NoSuchMethodException e) {
|
||||
e.printStackTrace();
|
||||
} catch (InvocationTargetException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
else {
|
||||
LimeLog.warning("SemWindowManager.getInstance() returned null");
|
||||
}
|
||||
} catch (ClassNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
} catch (NoSuchMethodException e) {
|
||||
e.printStackTrace();
|
||||
} catch (InvocationTargetException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -941,7 +905,7 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
displayRefreshRate = bestMode.getRefreshRate();
|
||||
}
|
||||
// On L, we can at least tell the OS that we want a refresh rate
|
||||
else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
else {
|
||||
float bestRefreshRate = display.getRefreshRate();
|
||||
for (float candidate : display.getSupportedRefreshRates()) {
|
||||
LimeLog.info("Examining refresh rate: "+candidate);
|
||||
@@ -965,19 +929,12 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
// Apply the refresh rate change
|
||||
getWindow().setAttributes(windowLayoutParams);
|
||||
}
|
||||
else {
|
||||
// Otherwise, the active display refresh rate is just
|
||||
// whatever is currently in use.
|
||||
displayRefreshRate = display.getRefreshRate();
|
||||
}
|
||||
|
||||
// From 4.4 to 5.1 we can't ask for a 4K display mode, so we'll
|
||||
// Until Marshmallow, we can't ask for a 4K display mode, so we'll
|
||||
// need to hint the OS to provide one.
|
||||
boolean aspectRatioMatch = false;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT &&
|
||||
Build.VERSION.SDK_INT <= Build.VERSION_CODES.LOLLIPOP_MR1) {
|
||||
// On KitKat and later (where we can use the whole screen via immersive mode), we'll
|
||||
// calculate whether we need to scale by aspect ratio or not. If not, we'll use
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
|
||||
// We'll calculate whether we need to scale by aspect ratio. If not, we'll use
|
||||
// setFixedSize so we can handle 4K properly. The only known devices that have
|
||||
// >= 4K screens have exactly 4K screens, so we'll be able to hit this good path
|
||||
// on these devices. On Marshmallow, we can start changing to 4K manually but no
|
||||
@@ -1032,8 +989,8 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
Game.this.getWindow().getDecorView().setSystemUiVisibility(
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
|
||||
}
|
||||
// Use immersive mode on 4.4+ or standard low profile on previous builds
|
||||
else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
else {
|
||||
// Use immersive mode
|
||||
Game.this.getWindow().getDecorView().setSystemUiVisibility(
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |
|
||||
@@ -1042,11 +999,6 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
View.SYSTEM_UI_FLAG_FULLSCREEN |
|
||||
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
|
||||
}
|
||||
else {
|
||||
Game.this.getWindow().getDecorView().setSystemUiVisibility(
|
||||
View.SYSTEM_UI_FLAG_FULLSCREEN |
|
||||
View.SYSTEM_UI_FLAG_LOW_PROFILE);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1069,16 +1021,10 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
// that case here too.
|
||||
if (isInMultiWindowMode) {
|
||||
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||
|
||||
// Disable performance optimizations for foreground
|
||||
getWindow().setSustainedPerformanceMode(false);
|
||||
decoderRenderer.notifyVideoBackground();
|
||||
}
|
||||
else {
|
||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||
|
||||
// Enable performance optimizations for foreground
|
||||
getWindow().setSustainedPerformanceMode(true);
|
||||
decoderRenderer.notifyVideoForeground();
|
||||
}
|
||||
|
||||
@@ -1090,12 +1036,11 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
|
||||
InputManager inputManager = (InputManager) getSystemService(Context.INPUT_SERVICE);
|
||||
if (controllerHandler != null) {
|
||||
inputManager.unregisterInputDeviceListener(controllerHandler);
|
||||
controllerHandler.destroy();
|
||||
}
|
||||
if (keyboardTranslator != null) {
|
||||
InputManager inputManager = (InputManager) getSystemService(Context.INPUT_SERVICE);
|
||||
inputManager.unregisterInputDeviceListener(keyboardTranslator);
|
||||
}
|
||||
|
||||
@@ -1115,6 +1060,21 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
inputCaptureProvider.destroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
if (isFinishing()) {
|
||||
// Stop any further input device notifications before we lose focus (and pointer capture)
|
||||
if (controllerHandler != null) {
|
||||
controllerHandler.stop();
|
||||
}
|
||||
|
||||
// Ungrab input to prevent further input device notifications
|
||||
setInputGrabState(false);
|
||||
}
|
||||
|
||||
super.onPause();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
@@ -1300,10 +1260,20 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
else if ((modifierFlags & (KeyboardPacket.MODIFIER_CTRL | KeyboardPacket.MODIFIER_ALT | KeyboardPacket.MODIFIER_SHIFT)) ==
|
||||
(KeyboardPacket.MODIFIER_CTRL | KeyboardPacket.MODIFIER_ALT | KeyboardPacket.MODIFIER_SHIFT) &&
|
||||
(down && nonModifierKeyCode != KeyEvent.KEYCODE_UNKNOWN)) {
|
||||
// Remember that a special key combo was activated, so we can consume all key events until the modifiers come up
|
||||
specialKeyCode = androidKeyCode;
|
||||
waitingForAllModifiersUp = true;
|
||||
return true;
|
||||
switch (androidKeyCode) {
|
||||
case KeyEvent.KEYCODE_Z:
|
||||
case KeyEvent.KEYCODE_Q:
|
||||
case KeyEvent.KEYCODE_C:
|
||||
// Remember that a special key combo was activated, so we can consume all key
|
||||
// events until the modifiers come up
|
||||
specialKeyCode = androidKeyCode;
|
||||
waitingForAllModifiersUp = true;
|
||||
return true;
|
||||
|
||||
default:
|
||||
// This isn't a special combo that we consume on the client side
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Not a special combo
|
||||
@@ -1330,6 +1300,18 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
if (event.isMetaPressed()) {
|
||||
modifier |= KeyboardPacket.MODIFIER_META;
|
||||
}
|
||||
return applyKeySpecificModifiers(event.getKeyCode(), modifier);
|
||||
}
|
||||
|
||||
private byte getModifierState(int keyCode) {
|
||||
return applyKeySpecificModifiers(keyCode, getModifierState());
|
||||
}
|
||||
|
||||
private byte applyKeySpecificModifiers(int keyCode, byte modifier) {
|
||||
if (keyCode == KeyEvent.KEYCODE_PLUS) {
|
||||
// The host protocol has a single US =/+ virtual key, so Android's semantic plus key needs Shift.
|
||||
modifier |= KeyboardPacket.MODIFIER_SHIFT;
|
||||
}
|
||||
return modifier;
|
||||
}
|
||||
|
||||
@@ -1869,7 +1851,9 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
|
||||
if (deltaX != 0 || deltaY != 0) {
|
||||
if (prefConfig.absoluteMouseMode) {
|
||||
conn.sendMouseMoveAsMousePosition(deltaX, deltaY, (short)view.getWidth(), (short)view.getHeight());
|
||||
// NB: view may be null, but we can unconditionally use streamView because we don't need to adjust
|
||||
// relative axis deltas for the position of the streamView within the parent's coordinate system.
|
||||
conn.sendMouseMoveAsMousePosition(deltaX, deltaY, (short)streamView.getWidth(), (short)streamView.getHeight());
|
||||
}
|
||||
else {
|
||||
conn.sendMouseMove(deltaX, deltaY);
|
||||
@@ -2215,13 +2199,11 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
@Override
|
||||
public boolean onTouch(View view, MotionEvent event) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
if (event.getAction() == MotionEvent.ACTION_DOWN) {
|
||||
// Tell the OS not to buffer input events for us
|
||||
//
|
||||
// NB: This is still needed even when we call the newer requestUnbufferedDispatch()!
|
||||
view.requestUnbufferedDispatch(event);
|
||||
}
|
||||
if (event.getAction() == MotionEvent.ACTION_DOWN) {
|
||||
// Tell the OS not to buffer input events for us
|
||||
//
|
||||
// NB: This is still needed even when we call the newer requestUnbufferedDispatch()!
|
||||
view.requestUnbufferedDispatch(event);
|
||||
}
|
||||
|
||||
return handleMotionEvent(view, event);
|
||||
@@ -2319,6 +2301,9 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
// Let the display go to sleep now
|
||||
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||
|
||||
// Stop processing controller input
|
||||
controllerHandler.stop();
|
||||
|
||||
// Ungrab input
|
||||
setInputGrabState(false);
|
||||
|
||||
@@ -2356,7 +2341,16 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
break;
|
||||
|
||||
default:
|
||||
message = getResources().getString(R.string.conn_terminated_msg);
|
||||
String errorCodeString;
|
||||
// We'll assume large errors are hex values
|
||||
if (Math.abs(errorCode) > 1000) {
|
||||
errorCodeString = Integer.toHexString(errorCode);
|
||||
}
|
||||
else {
|
||||
errorCodeString = Integer.toString(errorCode);
|
||||
}
|
||||
message = getResources().getString(R.string.conn_terminated_msg) + "\n\n" +
|
||||
getResources().getString(R.string.error_code_prefix) + " " + errorCodeString;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -2443,6 +2437,17 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
hideSystemUi(1000);
|
||||
}
|
||||
});
|
||||
|
||||
// Report this shortcut being used (off the main thread to prevent ANRs)
|
||||
ComputerDetails computer = new ComputerDetails();
|
||||
computer.name = pcName;
|
||||
computer.uuid = Game.this.getIntent().getStringExtra(EXTRA_PC_UUID);
|
||||
ShortcutHelper shortcutHelper = new ShortcutHelper(this);
|
||||
shortcutHelper.reportComputerShortcutUsed(computer);
|
||||
if (appName != null) {
|
||||
// This may be null if launched from the "Resume Session" PC context menu item
|
||||
shortcutHelper.reportGameLaunched(computer, app);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -2549,6 +2554,11 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
holder.getSurface().setFrameRate(desiredFrameRate,
|
||||
Surface.FRAME_RATE_COMPATIBILITY_FIXED_SOURCE);
|
||||
}
|
||||
|
||||
// Disable producer throttling on the underlying surface for reduced latency
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CINNAMON_BUN) {
|
||||
holder.getSurface().setProducerThrottlingEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -2626,10 +2636,10 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
}
|
||||
|
||||
if (buttonDown) {
|
||||
conn.sendKeyboardInput(keyMap, KeyboardPacket.KEY_DOWN, getModifierState(), (byte)0);
|
||||
conn.sendKeyboardInput(keyMap, KeyboardPacket.KEY_DOWN, getModifierState(keyCode), (byte)0);
|
||||
}
|
||||
else {
|
||||
conn.sendKeyboardInput(keyMap, KeyboardPacket.KEY_UP, getModifierState(), (byte)0);
|
||||
conn.sendKeyboardInput(keyMap, KeyboardPacket.KEY_UP, getModifierState(keyCode), (byte)0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2645,14 +2655,7 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
if ((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0) {
|
||||
hideSystemUi(2000);
|
||||
}
|
||||
// This flag is only set on 4.4+
|
||||
else if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT &&
|
||||
(visibility & View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) == 0) {
|
||||
hideSystemUi(2000);
|
||||
}
|
||||
// This flag is only set before 4.4+
|
||||
else if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.KITKAT &&
|
||||
(visibility & View.SYSTEM_UI_FLAG_LOW_PROFILE) == 0) {
|
||||
else if ((visibility & View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) == 0) {
|
||||
hideSystemUi(2000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -260,6 +260,11 @@ public class PcView extends Activity implements AdapterFragmentCallbacks {
|
||||
updateComputer(details);
|
||||
}
|
||||
});
|
||||
|
||||
// Add a launcher shortcut for this PC (off the main thread to prevent ANRs)
|
||||
if (details.pairState == PairState.PAIRED) {
|
||||
shortcutHelper.createAppViewShortcutForOnlineHost(details);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -720,11 +725,6 @@ public class PcView extends Activity implements AdapterFragmentCallbacks {
|
||||
}
|
||||
}
|
||||
|
||||
// Add a launcher shortcut for this PC
|
||||
if (details.pairState == PairState.PAIRED) {
|
||||
shortcutHelper.createAppViewShortcutForOnlineHost(details);
|
||||
}
|
||||
|
||||
if (existingEntry != null) {
|
||||
// Replace the information in the existing entry
|
||||
existingEntry.details = details;
|
||||
|
||||
@@ -8,19 +8,26 @@ import android.content.ServiceConnection;
|
||||
import android.os.Bundle;
|
||||
import android.os.IBinder;
|
||||
|
||||
import com.limelight.computers.ComputerDatabaseManager;
|
||||
import com.limelight.computers.ComputerManagerListener;
|
||||
import com.limelight.computers.ComputerManagerService;
|
||||
import com.limelight.nvstream.http.ComputerDetails;
|
||||
import com.limelight.nvstream.http.NvApp;
|
||||
import com.limelight.nvstream.http.NvHTTP;
|
||||
import com.limelight.nvstream.http.PairingManager;
|
||||
import com.limelight.nvstream.wol.WakeOnLanSender;
|
||||
import com.limelight.utils.CacheHelper;
|
||||
import com.limelight.utils.Dialog;
|
||||
import com.limelight.utils.ServerHelper;
|
||||
import com.limelight.utils.SpinnerDialog;
|
||||
import com.limelight.utils.UiHelper;
|
||||
|
||||
import org.xmlpull.v1.XmlPullParserException;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.StringReader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
public class ShortcutTrampoline extends Activity {
|
||||
@@ -33,6 +40,7 @@ public class ShortcutTrampoline extends Activity {
|
||||
private SpinnerDialog blockingLoadSpinner;
|
||||
|
||||
private ComputerManagerService.ComputerManagerBinder managerBinder;
|
||||
|
||||
private final ServiceConnection serviceConnection = new ServiceConnection() {
|
||||
public void onServiceConnected(ComponentName className, IBinder binder) {
|
||||
final ComputerManagerService.ComputerManagerBinder localBinder =
|
||||
@@ -214,9 +222,9 @@ public class ShortcutTrampoline extends Activity {
|
||||
}
|
||||
};
|
||||
|
||||
protected boolean validateInput(String uuidString, String appIdString) {
|
||||
// Validate UUID
|
||||
if (uuidString == null) {
|
||||
protected boolean validateInput(String uuidString, String appIdString, String nameString) {
|
||||
// Validate PC UUID/Name
|
||||
if (uuidString == null && nameString == null) {
|
||||
Dialog.displayDialog(ShortcutTrampoline.this,
|
||||
getResources().getString(R.string.conn_error_title),
|
||||
getResources().getString(R.string.scut_invalid_uuid),
|
||||
@@ -224,14 +232,25 @@ public class ShortcutTrampoline extends Activity {
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
UUID.fromString(uuidString);
|
||||
} catch (IllegalArgumentException ex) {
|
||||
Dialog.displayDialog(ShortcutTrampoline.this,
|
||||
getResources().getString(R.string.conn_error_title),
|
||||
getResources().getString(R.string.scut_invalid_uuid),
|
||||
true);
|
||||
return false;
|
||||
if (uuidString != null && !uuidString.isEmpty()) {
|
||||
try {
|
||||
UUID.fromString(uuidString);
|
||||
} catch (IllegalArgumentException ex) {
|
||||
Dialog.displayDialog(ShortcutTrampoline.this,
|
||||
getResources().getString(R.string.conn_error_title),
|
||||
getResources().getString(R.string.scut_invalid_uuid),
|
||||
true);
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
// UUID is null, so fallback to Name
|
||||
if (nameString == null || nameString.isEmpty()) {
|
||||
Dialog.displayDialog(ShortcutTrampoline.this,
|
||||
getResources().getString(R.string.conn_error_title),
|
||||
getResources().getString(R.string.scut_invalid_uuid),
|
||||
true);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Validate App ID (if provided)
|
||||
@@ -255,24 +274,93 @@ public class ShortcutTrampoline extends Activity {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
UiHelper.notifyNewRootView(this);
|
||||
ComputerDatabaseManager dbManager = new ComputerDatabaseManager(this);
|
||||
ComputerDetails _computer = null;
|
||||
|
||||
String appIdString = getIntent().getStringExtra(Game.EXTRA_APP_ID);
|
||||
// PC arguments, both are optional, but at least one must be provided
|
||||
uuidString = getIntent().getStringExtra(AppView.UUID_EXTRA);
|
||||
String nameString = getIntent().getStringExtra(AppView.NAME_EXTRA);
|
||||
|
||||
if (validateInput(uuidString, appIdString)) {
|
||||
if (appIdString != null && !appIdString.isEmpty()) {
|
||||
app = new NvApp(getIntent().getStringExtra(Game.EXTRA_APP_NAME),
|
||||
Integer.parseInt(appIdString),
|
||||
getIntent().getBooleanExtra(Game.EXTRA_APP_HDR, false));
|
||||
// App arguments, both are optional, but one must be provided in order to start an app
|
||||
String appIdString = getIntent().getStringExtra(Game.EXTRA_APP_ID);
|
||||
String appNameString = getIntent().getStringExtra(Game.EXTRA_APP_NAME);
|
||||
|
||||
if (!validateInput(uuidString, appIdString, nameString)) {
|
||||
// Invalid input, so just return
|
||||
return;
|
||||
}
|
||||
|
||||
if (uuidString == null || uuidString.isEmpty()) {
|
||||
// Use nameString to find the corresponding UUID
|
||||
_computer = dbManager.getComputerByName(nameString);
|
||||
|
||||
if (_computer == null) {
|
||||
Dialog.displayDialog(ShortcutTrampoline.this,
|
||||
getResources().getString(R.string.conn_error_title),
|
||||
getResources().getString(R.string.scut_pc_not_found),
|
||||
true);
|
||||
return;
|
||||
}
|
||||
|
||||
// Bind to the computer manager service
|
||||
bindService(new Intent(this, ComputerManagerService.class), serviceConnection,
|
||||
Service.BIND_AUTO_CREATE);
|
||||
uuidString = _computer.uuid;
|
||||
|
||||
blockingLoadSpinner = SpinnerDialog.displayDialog(this, getResources().getString(R.string.conn_establishing_title),
|
||||
getResources().getString(R.string.applist_connect_msg), true);
|
||||
// Set the AppView UUID intent, since it wasn't provided
|
||||
setIntent(new Intent(getIntent()).putExtra(AppView.UUID_EXTRA, uuidString));
|
||||
}
|
||||
|
||||
if (appIdString != null && !appIdString.isEmpty()) {
|
||||
app = new NvApp(getIntent().getStringExtra(Game.EXTRA_APP_NAME),
|
||||
Integer.parseInt(appIdString),
|
||||
getIntent().getBooleanExtra(Game.EXTRA_APP_HDR, false));
|
||||
}
|
||||
else if (appNameString != null && !appNameString.isEmpty()) {
|
||||
// Use appNameString to find the corresponding AppId
|
||||
try {
|
||||
int appId = -1;
|
||||
String rawAppList = CacheHelper.readInputStreamToString(CacheHelper.openCacheFileForInput(getCacheDir(), "applist", uuidString));
|
||||
|
||||
if (rawAppList.isEmpty()) {
|
||||
Dialog.displayDialog(ShortcutTrampoline.this,
|
||||
getResources().getString(R.string.conn_error_title),
|
||||
getResources().getString(R.string.scut_invalid_app_id),
|
||||
true);
|
||||
return;
|
||||
}
|
||||
List<NvApp> applist = NvHTTP.getAppListByReader(new StringReader(rawAppList));
|
||||
|
||||
for (NvApp _app : applist) {
|
||||
if (_app.getAppName().equals(appNameString)) {
|
||||
appId = _app.getAppId();
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (appId < 0) {
|
||||
Dialog.displayDialog(ShortcutTrampoline.this,
|
||||
getResources().getString(R.string.conn_error_title),
|
||||
getResources().getString(R.string.scut_invalid_app_id),
|
||||
true);
|
||||
return;
|
||||
}
|
||||
setIntent(new Intent(getIntent()).putExtra(Game.EXTRA_APP_ID, appId));
|
||||
app = new NvApp(
|
||||
appNameString,
|
||||
appId,
|
||||
getIntent().getBooleanExtra(Game.EXTRA_APP_HDR, false));
|
||||
} catch (IOException | XmlPullParserException e) {
|
||||
Dialog.displayDialog(ShortcutTrampoline.this,
|
||||
getResources().getString(R.string.conn_error_title),
|
||||
getResources().getString(R.string.scut_invalid_app_id),
|
||||
true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Bind to the computer manager service
|
||||
bindService(new Intent(this, ComputerManagerService.class), serviceConnection,
|
||||
Service.BIND_AUTO_CREATE);
|
||||
|
||||
blockingLoadSpinner = SpinnerDialog.displayDialog(this, getResources().getString(R.string.conn_establishing_title),
|
||||
getResources().getString(R.string.applist_connect_msg), true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -26,51 +26,41 @@ public class AndroidAudioRenderer implements AudioRenderer {
|
||||
}
|
||||
|
||||
private AudioTrack createAudioTrack(int channelConfig, int sampleRate, int bufferSize, boolean lowLatency) {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
|
||||
return new AudioTrack(AudioManager.STREAM_MUSIC,
|
||||
sampleRate,
|
||||
channelConfig,
|
||||
AudioFormat.ENCODING_PCM_16BIT,
|
||||
bufferSize,
|
||||
AudioTrack.MODE_STREAM);
|
||||
AudioAttributes.Builder attributesBuilder = new AudioAttributes.Builder()
|
||||
.setUsage(AudioAttributes.USAGE_GAME);
|
||||
AudioFormat format = new AudioFormat.Builder()
|
||||
.setEncoding(AudioFormat.ENCODING_PCM_16BIT)
|
||||
.setSampleRate(sampleRate)
|
||||
.setChannelMask(channelConfig)
|
||||
.build();
|
||||
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
|
||||
// Use FLAG_LOW_LATENCY on L through N
|
||||
if (lowLatency) {
|
||||
attributesBuilder.setFlags(AudioAttributes.FLAG_LOW_LATENCY);
|
||||
}
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
AudioTrack.Builder trackBuilder = new AudioTrack.Builder()
|
||||
.setAudioFormat(format)
|
||||
.setAudioAttributes(attributesBuilder.build())
|
||||
.setTransferMode(AudioTrack.MODE_STREAM)
|
||||
.setBufferSizeInBytes(bufferSize);
|
||||
|
||||
// Use PERFORMANCE_MODE_LOW_LATENCY on O and later
|
||||
if (lowLatency) {
|
||||
trackBuilder.setPerformanceMode(AudioTrack.PERFORMANCE_MODE_LOW_LATENCY);
|
||||
}
|
||||
|
||||
return trackBuilder.build();
|
||||
}
|
||||
else {
|
||||
AudioAttributes.Builder attributesBuilder = new AudioAttributes.Builder()
|
||||
.setUsage(AudioAttributes.USAGE_GAME);
|
||||
AudioFormat format = new AudioFormat.Builder()
|
||||
.setEncoding(AudioFormat.ENCODING_PCM_16BIT)
|
||||
.setSampleRate(sampleRate)
|
||||
.setChannelMask(channelConfig)
|
||||
.build();
|
||||
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
|
||||
// Use FLAG_LOW_LATENCY on L through N
|
||||
if (lowLatency) {
|
||||
attributesBuilder.setFlags(AudioAttributes.FLAG_LOW_LATENCY);
|
||||
}
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
AudioTrack.Builder trackBuilder = new AudioTrack.Builder()
|
||||
.setAudioFormat(format)
|
||||
.setAudioAttributes(attributesBuilder.build())
|
||||
.setTransferMode(AudioTrack.MODE_STREAM)
|
||||
.setBufferSizeInBytes(bufferSize);
|
||||
|
||||
// Use PERFORMANCE_MODE_LOW_LATENCY on O and later
|
||||
if (lowLatency) {
|
||||
trackBuilder.setPerformanceMode(AudioTrack.PERFORMANCE_MODE_LOW_LATENCY);
|
||||
}
|
||||
|
||||
return trackBuilder.build();
|
||||
}
|
||||
else {
|
||||
return new AudioTrack(attributesBuilder.build(),
|
||||
format,
|
||||
bufferSize,
|
||||
AudioTrack.MODE_STREAM,
|
||||
AudioManager.AUDIO_SESSION_ID_GENERATE);
|
||||
}
|
||||
return new AudioTrack(attributesBuilder.build(),
|
||||
format,
|
||||
bufferSize,
|
||||
AudioTrack.MODE_STREAM,
|
||||
AudioManager.AUDIO_SESSION_ID_GENERATE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,20 +81,10 @@ public class AndroidAudioRenderer implements AudioRenderer {
|
||||
channelConfig = AudioFormat.CHANNEL_OUT_5POINT1;
|
||||
break;
|
||||
case 8:
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
// AudioFormat.CHANNEL_OUT_7POINT1_SURROUND isn't available until Android 6.0,
|
||||
// yet the CHANNEL_OUT_SIDE_LEFT and CHANNEL_OUT_SIDE_RIGHT constants were added
|
||||
// in 5.0, so just hardcode the constant so we can work on Lollipop.
|
||||
channelConfig = 0x000018fc; // AudioFormat.CHANNEL_OUT_7POINT1_SURROUND
|
||||
}
|
||||
else {
|
||||
// On KitKat and lower, creation of the AudioTrack will fail if we specify
|
||||
// CHANNEL_OUT_SIDE_LEFT or CHANNEL_OUT_SIDE_RIGHT. That leaves us with
|
||||
// the old CHANNEL_OUT_7POINT1 which uses left-of-center and right-of-center
|
||||
// speakers instead of side-left and side-right. This non-standard layout
|
||||
// is probably not what the user wants, but we don't really have a choice.
|
||||
channelConfig = AudioFormat.CHANNEL_OUT_7POINT1;
|
||||
}
|
||||
// AudioFormat.CHANNEL_OUT_7POINT1_SURROUND isn't available until Android 6.0,
|
||||
// yet the CHANNEL_OUT_SIDE_LEFT and CHANNEL_OUT_SIDE_RIGHT constants were added
|
||||
// in 5.0, so just hardcode the constant so we can work on Lollipop.
|
||||
channelConfig = 0x000018fc; // AudioFormat.CHANNEL_OUT_7POINT1_SURROUND
|
||||
break;
|
||||
default:
|
||||
LimeLog.severe("Decoder returned unhandled channel count");
|
||||
|
||||
@@ -12,12 +12,12 @@ import java.security.KeyFactory;
|
||||
import java.security.KeyPair;
|
||||
import java.security.KeyPairGenerator;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.PrivateKey;
|
||||
import java.security.Provider;
|
||||
import java.security.SecureRandom;
|
||||
import java.security.cert.CertificateException;
|
||||
import java.security.cert.CertificateFactory;
|
||||
import java.security.cert.X509Certificate;
|
||||
import java.security.interfaces.RSAPrivateKey;
|
||||
import java.security.spec.InvalidKeySpecException;
|
||||
import java.security.spec.PKCS8EncodedKeySpec;
|
||||
import java.util.Calendar;
|
||||
@@ -48,7 +48,7 @@ public class AndroidCryptoProvider implements LimelightCryptoProvider {
|
||||
private final File keyFile;
|
||||
|
||||
private X509Certificate cert;
|
||||
private RSAPrivateKey key;
|
||||
private PrivateKey key;
|
||||
private byte[] pemCertBytes;
|
||||
|
||||
private static final Object globalCryptoLock = new Object();
|
||||
@@ -94,7 +94,7 @@ public class AndroidCryptoProvider implements LimelightCryptoProvider {
|
||||
cert = (X509Certificate) certFactory.generateCertificate(new ByteArrayInputStream(certBytes));
|
||||
pemCertBytes = certBytes;
|
||||
KeyFactory keyFactory = KeyFactory.getInstance("RSA", bcProvider);
|
||||
key = (RSAPrivateKey) keyFactory.generatePrivate(new PKCS8EncodedKeySpec(keyBytes));
|
||||
key = keyFactory.generatePrivate(new PKCS8EncodedKeySpec(keyBytes));
|
||||
} catch (CertificateException e) {
|
||||
// May happen if the cert is corrupt
|
||||
LimeLog.warning("Corrupted certificate");
|
||||
@@ -144,7 +144,7 @@ public class AndroidCryptoProvider implements LimelightCryptoProvider {
|
||||
try {
|
||||
ContentSigner sigGen = new JcaContentSignerBuilder("SHA256withRSA").setProvider(bcProvider).build(keyPair.getPrivate());
|
||||
cert = new JcaX509CertificateConverter().setProvider(bcProvider).getCertificate(certBuilder.build(sigGen));
|
||||
key = (RSAPrivateKey) keyPair.getPrivate();
|
||||
key = keyPair.getPrivate();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
@@ -215,7 +215,7 @@ public class AndroidCryptoProvider implements LimelightCryptoProvider {
|
||||
}
|
||||
}
|
||||
|
||||
public RSAPrivateKey getClientPrivateKey() {
|
||||
public PrivateKey getClientPrivateKey() {
|
||||
// Use a lock here to ensure only one guy will be generating or loading
|
||||
// the certificate and key at a time
|
||||
synchronized (globalCryptoLock) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.limelight.binding.input;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
@@ -69,6 +70,7 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
|
||||
private static final int BATTERY_RECHECK_INTERVAL_MS = 120 * 1000;
|
||||
|
||||
@SuppressLint("InlinedApi")
|
||||
private static final Map<Integer, Integer> ANDROID_TO_LI_BUTTON_MAP = Map.ofEntries(
|
||||
Map.entry(KeyEvent.KEYCODE_BUTTON_A, ControllerPacket.A_FLAG),
|
||||
Map.entry(KeyEvent.KEYCODE_BUTTON_B, ControllerPacket.B_FLAG),
|
||||
@@ -114,6 +116,7 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
private final double stickDeadzone;
|
||||
private final InputDeviceContext defaultContext = new InputDeviceContext();
|
||||
private final GameGestures gestures;
|
||||
private final InputManager inputManager;
|
||||
private final Vibrator deviceVibrator;
|
||||
private final VibratorManager deviceVibratorManager;
|
||||
private final SensorManager deviceSensorManager;
|
||||
@@ -132,8 +135,18 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
this.conn = conn;
|
||||
this.gestures = gestures;
|
||||
this.prefConfig = prefConfig;
|
||||
this.deviceVibrator = (Vibrator) activityContext.getSystemService(Context.VIBRATOR_SERVICE);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
this.deviceVibratorManager = (VibratorManager) activityContext.getSystemService(Context.VIBRATOR_MANAGER_SERVICE);
|
||||
this.deviceVibrator = (Vibrator) this.deviceVibratorManager.getDefaultVibrator();
|
||||
}
|
||||
else {
|
||||
this.deviceVibratorManager = null;
|
||||
this.deviceVibrator = (Vibrator) activityContext.getSystemService(Context.VIBRATOR_SERVICE);
|
||||
}
|
||||
|
||||
this.deviceSensorManager = (SensorManager) activityContext.getSystemService(Context.SENSOR_SERVICE);
|
||||
this.inputManager = (InputManager) activityContext.getSystemService(Context.INPUT_SERVICE);
|
||||
this.mainThreadHandler = new Handler(Looper.getMainLooper());
|
||||
|
||||
// Create a HandlerThread to process battery state updates. These can be slow enough
|
||||
@@ -142,13 +155,6 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
this.backgroundHandlerThread.start();
|
||||
this.backgroundThreadHandler = new Handler(backgroundHandlerThread.getLooper());
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
this.deviceVibratorManager = (VibratorManager) activityContext.getSystemService(Context.VIBRATOR_MANAGER_SERVICE);
|
||||
}
|
||||
else {
|
||||
this.deviceVibratorManager = null;
|
||||
}
|
||||
|
||||
this.sceManager = new SceManager(activityContext);
|
||||
this.sceManager.start();
|
||||
|
||||
@@ -205,6 +211,9 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
// currentControllers set which will allow them to properly unplug
|
||||
// if they are removed.
|
||||
initialControllers = getAttachedControllerMask(activityContext);
|
||||
|
||||
// Register ourselves for input device notifications
|
||||
inputManager.registerInputDeviceListener(this, null);
|
||||
}
|
||||
|
||||
private static InputDevice.MotionRange getMotionRangeForJoystickAxis(InputDevice dev, int axis) {
|
||||
@@ -260,9 +269,16 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
if (stopped) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Stop new device contexts from being created or used
|
||||
stopped = true;
|
||||
|
||||
// Unregister our input device callbacks
|
||||
inputManager.unregisterInputDeviceListener(this);
|
||||
|
||||
for (int i = 0; i < inputDeviceContexts.size(); i++) {
|
||||
InputDeviceContext deviceContext = inputDeviceContexts.valueAt(i);
|
||||
deviceContext.destroy();
|
||||
@@ -293,6 +309,10 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
}
|
||||
|
||||
public void enableSensors() {
|
||||
if (stopped) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < inputDeviceContexts.size(); i++) {
|
||||
InputDeviceContext deviceContext = inputDeviceContexts.valueAt(i);
|
||||
deviceContext.enableSensors();
|
||||
@@ -650,7 +670,7 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
// back button to function for navigation.
|
||||
//
|
||||
// First, check if this is an internal device we're being called on.
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT && !isExternal(dev)) {
|
||||
if (!isExternal(dev)) {
|
||||
InputManager im = (InputManager) activityContext.getSystemService(Context.INPUT_SERVICE);
|
||||
|
||||
boolean foundInternalGamepad = false;
|
||||
@@ -696,10 +716,8 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
String devName = dev.getName();
|
||||
|
||||
LimeLog.info("Creating controller context for device: "+devName);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
LimeLog.info("Vendor ID: "+dev.getVendorId());
|
||||
LimeLog.info("Product ID: "+dev.getProductId());
|
||||
}
|
||||
LimeLog.info("Vendor ID: " + dev.getVendorId());
|
||||
LimeLog.info("Product ID: "+dev.getProductId());
|
||||
LimeLog.info(dev.toString());
|
||||
|
||||
context.inputDevice = dev;
|
||||
@@ -707,15 +725,13 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
context.id = dev.getId();
|
||||
context.external = isExternal(dev);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
context.vendorId = dev.getVendorId();
|
||||
context.productId = dev.getProductId();
|
||||
context.vendorId = dev.getVendorId();
|
||||
context.productId = dev.getProductId();
|
||||
|
||||
// These aren't always present in the Android key layout files, so they won't show up
|
||||
// in our normal InputDevice.hasKeys() probing.
|
||||
context.hasPaddles = MoonBridge.guessControllerHasPaddles(context.vendorId, context.productId);
|
||||
context.hasShare = MoonBridge.guessControllerHasShareButton(context.vendorId, context.productId);
|
||||
}
|
||||
// These aren't always present in the Android key layout files, so they won't show up
|
||||
// in our normal InputDevice.hasKeys() probing.
|
||||
context.hasPaddles = MoonBridge.guessControllerHasPaddles(context.vendorId, context.productId);
|
||||
context.hasShare = MoonBridge.guessControllerHasShareButton(context.vendorId, context.productId);
|
||||
|
||||
// Try to use the InputDevice's associated vibrators first
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S && hasQuadAmplitudeControlledRumbleVibrators(dev.getVibratorManager())) {
|
||||
@@ -753,22 +769,37 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
// created upon the first call to InputDevice.getSensorManager(), so we avoid calling this
|
||||
// on Android 12 unless we have a gamepad that could plausibly have motion sensors.
|
||||
// https://cs.android.com/android/_/android/platform/frameworks/base/+/8970010a5e9f3dc5c069f56b4147552accfcbbeb
|
||||
if ((Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU ||
|
||||
(Build.VERSION.SDK_INT == Build.VERSION_CODES.S &&
|
||||
(context.vendorId == 0x054c || context.vendorId == 0x057e))) && // Sony or Nintendo
|
||||
prefConfig.gamepadMotionSensors) {
|
||||
if (dev.getSensorManager().getDefaultSensor(Sensor.TYPE_ACCELEROMETER) != null || dev.getSensorManager().getDefaultSensor(Sensor.TYPE_GYROSCOPE) != null) {
|
||||
context.sensorManager = dev.getSensorManager();
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
if ((Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU || context.vendorId == 0x054c || context.vendorId == 0x057e) && // Sony or Nintendo
|
||||
prefConfig.gamepadMotionSensors) {
|
||||
if (dev.getSensorManager().getDefaultSensor(Sensor.TYPE_ACCELEROMETER) != null || dev.getSensorManager().getDefaultSensor(Sensor.TYPE_GYROSCOPE) != null) {
|
||||
context.sensorManager = dev.getSensorManager();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Check if this device has a usable RGB LED and cache that result
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
for (Light light : dev.getLightsManager().getLights()) {
|
||||
if (light.hasRgbControl()) {
|
||||
context.hasRgbLed = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Light.hasRgbControl() was totally broken prior to Android 14.
|
||||
// It always returned true because LIGHT_CAPABILITY_RGB was defined as 0,
|
||||
// so we will just guess RGB is supported if it's a PlayStation controller.
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.UPSIDE_DOWN_CAKE && context.vendorId != 0x054c) {
|
||||
context.hasRgbLed = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Detect if the gamepad has Mode and Select buttons according to the Android key layouts.
|
||||
// We do this first because other codepaths below may override these defaults.
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
boolean[] buttons = dev.hasKeys(KeyEvent.KEYCODE_BUTTON_MODE, KeyEvent.KEYCODE_BUTTON_SELECT, KeyEvent.KEYCODE_BACK, 0);
|
||||
context.hasMode = buttons[0];
|
||||
context.hasSelect = buttons[1] || buttons[2];
|
||||
}
|
||||
boolean[] buttons = dev.hasKeys(KeyEvent.KEYCODE_BUTTON_MODE, KeyEvent.KEYCODE_BUTTON_SELECT, KeyEvent.KEYCODE_BACK, 0);
|
||||
context.hasMode = buttons[0];
|
||||
context.hasSelect = buttons[1] || buttons[2];
|
||||
|
||||
context.touchpadXRange = dev.getMotionRange(MotionEvent.AXIS_X, InputDevice.SOURCE_TOUCHPAD);
|
||||
context.touchpadYRange = dev.getMotionRange(MotionEvent.AXIS_Y, InputDevice.SOURCE_TOUCHPAD);
|
||||
@@ -818,22 +849,15 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
InputDevice.MotionRange rxRange = getMotionRangeForJoystickAxis(dev, MotionEvent.AXIS_RX);
|
||||
InputDevice.MotionRange ryRange = getMotionRangeForJoystickAxis(dev, MotionEvent.AXIS_RY);
|
||||
if (rxRange != null && ryRange != null && devName != null) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
if (dev.getVendorId() == 0x054c) { // Sony
|
||||
if (dev.hasKeys(KeyEvent.KEYCODE_BUTTON_C)[0]) {
|
||||
LimeLog.info("Detected non-standard DualShock 4 mapping");
|
||||
context.isNonStandardDualShock4 = true;
|
||||
}
|
||||
else {
|
||||
LimeLog.info("Detected DualShock 4 (Linux standard mapping)");
|
||||
context.usesLinuxGamepadStandardFaceButtons = true;
|
||||
}
|
||||
if (dev.getVendorId() == 0x054c) { // Sony
|
||||
if (dev.hasKeys(KeyEvent.KEYCODE_BUTTON_C)[0]) {
|
||||
LimeLog.info("Detected non-standard DualShock 4 mapping");
|
||||
context.isNonStandardDualShock4 = true;
|
||||
} else {
|
||||
LimeLog.info("Detected DualShock 4 (Linux standard mapping)");
|
||||
context.usesLinuxGamepadStandardFaceButtons = true;
|
||||
}
|
||||
}
|
||||
else if (!devName.contains("Xbox") && !devName.contains("XBox") && !devName.contains("X-Box")) {
|
||||
LimeLog.info("Assuming non-standard DualShock 4 mapping on < 4.4");
|
||||
context.isNonStandardDualShock4 = true;
|
||||
}
|
||||
|
||||
if (context.isNonStandardDualShock4) {
|
||||
// The old DS4 driver uses RX and RY for triggers
|
||||
@@ -917,16 +941,12 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
}
|
||||
|
||||
// The ADT-1 controller needs a similar fixup to the ASUS Gamepad
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
// The device name provided is just "Gamepad" which is pretty useless, so we
|
||||
// use VID/PID instead
|
||||
if (dev.getVendorId() == 0x18d1 && dev.getProductId() == 0x2c40) {
|
||||
context.backIsStart = true;
|
||||
context.modeIsSelect = true;
|
||||
context.triggerDeadzone = 0.30f;
|
||||
context.hasSelect = true;
|
||||
context.hasMode = false;
|
||||
}
|
||||
if (dev.getVendorId() == 0x18d1 && dev.getProductId() == 0x2c40) {
|
||||
context.backIsStart = true;
|
||||
context.modeIsSelect = true;
|
||||
context.triggerDeadzone = 0.30f;
|
||||
context.hasSelect = true;
|
||||
context.hasMode = false;
|
||||
}
|
||||
|
||||
context.ignoreBack = shouldIgnoreBack(dev);
|
||||
@@ -936,16 +956,12 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
// use the back button as start since it doesn't have a start/menu button
|
||||
// on the controller
|
||||
if (devName.contains("ASUS Gamepad")) {
|
||||
// We can only do this check on KitKat or higher, but it doesn't matter since ATV
|
||||
// is Android 5.0 anyway
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
boolean[] hasStartKey = dev.hasKeys(KeyEvent.KEYCODE_BUTTON_START, KeyEvent.KEYCODE_MENU, 0);
|
||||
if (!hasStartKey[0] && !hasStartKey[1]) {
|
||||
context.backIsStart = true;
|
||||
context.modeIsSelect = true;
|
||||
context.hasSelect = true;
|
||||
context.hasMode = false;
|
||||
}
|
||||
boolean[] hasStartKey = dev.hasKeys(KeyEvent.KEYCODE_BUTTON_START, KeyEvent.KEYCODE_MENU, 0);
|
||||
if (!hasStartKey[0] && !hasStartKey[1]) {
|
||||
context.backIsStart = true;
|
||||
context.modeIsSelect = true;
|
||||
context.hasSelect = true;
|
||||
context.hasMode = false;
|
||||
}
|
||||
|
||||
// The ASUS Gamepad has triggers that sit far forward and are prone to false presses
|
||||
@@ -988,6 +1004,12 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
}
|
||||
}
|
||||
|
||||
// Thrustmaster Score A gamepad home button reports directly to android as
|
||||
// KEY_HOMEPAGE event on another event channel
|
||||
if (dev.getVendorId() == 0x044f && dev.getProductId() == 0xb328) {
|
||||
context.hasMode = false;
|
||||
}
|
||||
|
||||
LimeLog.info("Analog stick deadzone: "+context.leftStickDeadzoneRadius+" "+context.rightStickDeadzoneRadius);
|
||||
LimeLog.info("Trigger deadzone: "+context.triggerDeadzone);
|
||||
|
||||
@@ -1075,6 +1097,7 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
}
|
||||
|
||||
// This must not be called on the main thread due to risk of ANRs!
|
||||
@SuppressLint("InlinedApi")
|
||||
private void sendControllerBatteryPacket(InputDeviceContext context) {
|
||||
int currentBatteryStatus;
|
||||
float currentBatteryCapacity;
|
||||
@@ -1823,21 +1846,30 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
return true;
|
||||
}
|
||||
|
||||
private short scaleRawStickAxis(float stickValue) {
|
||||
return (short)Math.pow(stickValue, 3);
|
||||
}
|
||||
|
||||
private void sendEmulatedMouseEvent(short x, short y) {
|
||||
private Vector2d convertRawStickAxisToPixelMovement(short stickX, short stickY) {
|
||||
Vector2d vector = new Vector2d();
|
||||
vector.initialize(x, y);
|
||||
vector.initialize(stickX, stickY);
|
||||
vector.scalarMultiply(1 / 32766.0f);
|
||||
vector.scalarMultiply(4);
|
||||
if (vector.getMagnitude() > 0) {
|
||||
// Move faster as the stick is pressed further from center
|
||||
vector.scalarMultiply(Math.pow(vector.getMagnitude(), 2));
|
||||
if (vector.getMagnitude() >= 1) {
|
||||
conn.sendMouseMove((short)vector.getX(), (short)-vector.getY());
|
||||
}
|
||||
}
|
||||
return vector;
|
||||
}
|
||||
|
||||
private void sendEmulatedMouseMove(short x, short y) {
|
||||
Vector2d vector = convertRawStickAxisToPixelMovement(x, y);
|
||||
if (vector.getMagnitude() >= 1) {
|
||||
conn.sendMouseMove((short)vector.getX(), (short)-vector.getY());
|
||||
}
|
||||
}
|
||||
|
||||
private void sendEmulatedMouseScroll(short x, short y) {
|
||||
Vector2d vector = convertRawStickAxisToPixelMovement(x, y);
|
||||
if (vector.getMagnitude() >= 1) {
|
||||
conn.sendMouseHighResScroll((short)vector.getY());
|
||||
conn.sendMouseHighResHScroll((short)vector.getX());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2005,21 +2037,22 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
.build();
|
||||
vibrator.vibrate(VibrationEffect.createWaveform(new long[]{0, onTime, offTime}, 0), vibrationAttributes);
|
||||
}
|
||||
else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
else {
|
||||
AudioAttributes audioAttributes = new AudioAttributes.Builder()
|
||||
.setUsage(AudioAttributes.USAGE_GAME)
|
||||
.build();
|
||||
vibrator.vibrate(new long[]{0, onTime, offTime}, 0, audioAttributes);
|
||||
}
|
||||
else {
|
||||
vibrator.vibrate(new long[]{0, onTime, offTime}, 0);
|
||||
}
|
||||
}
|
||||
|
||||
public void handleRumble(short controllerNumber, short lowFreqMotor, short highFreqMotor) {
|
||||
boolean foundMatchingDevice = false;
|
||||
boolean vibrated = false;
|
||||
|
||||
if (stopped) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < inputDeviceContexts.size(); i++) {
|
||||
InputDeviceContext deviceContext = inputDeviceContexts.valueAt(i);
|
||||
|
||||
@@ -2074,12 +2107,25 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
else if (foundMatchingDevice && !vibrated && prefConfig.vibrateFallbackToDevice) {
|
||||
// We found a device to vibrate but it didn't have rumble support. The user
|
||||
// has requested us to vibrate the device in this case.
|
||||
rumbleSingleVibrator(deviceVibrator, lowFreqMotor, highFreqMotor);
|
||||
|
||||
// We cast the unsigned short value to a signed int before multiplying by
|
||||
// the preferred strength. The resulting value is capped at 65534 before
|
||||
// we cast it back to a short so it doesn't go above 100%.
|
||||
short lowFreqMotorAdjusted = (short)(Math.min((((lowFreqMotor & 0xffff)
|
||||
* prefConfig.vibrateFallbackToDeviceStrength) / 100), Short.MAX_VALUE*2));
|
||||
short highFreqMotorAdjusted = (short)(Math.min((((highFreqMotor & 0xffff)
|
||||
* prefConfig.vibrateFallbackToDeviceStrength) / 100), Short.MAX_VALUE*2));
|
||||
|
||||
rumbleSingleVibrator(deviceVibrator, lowFreqMotorAdjusted, highFreqMotorAdjusted);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void handleRumbleTriggers(short controllerNumber, short leftTrigger, short rightTrigger) {
|
||||
if (stopped) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
for (int i = 0; i < inputDeviceContexts.size(); i++) {
|
||||
InputDeviceContext deviceContext = inputDeviceContexts.valueAt(i);
|
||||
@@ -2191,6 +2237,10 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
}
|
||||
|
||||
public void handleSetMotionEventState(final short controllerNumber, final byte motionType, short reportRateHz) {
|
||||
if (stopped) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Report rate is restricted to <= 200 Hz without the HIGH_SAMPLING_RATE_SENSORS permission
|
||||
reportRateHz = (short) Math.min(200, reportRateHz);
|
||||
|
||||
@@ -2252,30 +2302,21 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
}
|
||||
|
||||
public void handleSetControllerLED(short controllerNumber, byte r, byte g, byte b) {
|
||||
if (stopped) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
for (int i = 0; i < inputDeviceContexts.size(); i++) {
|
||||
InputDeviceContext deviceContext = inputDeviceContexts.valueAt(i);
|
||||
|
||||
if (deviceContext.controllerNumber == controllerNumber) {
|
||||
// Create a new light session if one doesn't already exist
|
||||
if (deviceContext.lightsSession == null) {
|
||||
deviceContext.lightsSession = deviceContext.inputDevice.getLightsManager().openSession();
|
||||
}
|
||||
|
||||
// Ignore input devices without an RGB LED
|
||||
if (deviceContext.controllerNumber == controllerNumber && deviceContext.hasRgbLed) {
|
||||
// Convert the RGB components into the integer value that LightState uses
|
||||
int argbValue = 0xFF000000 | ((r << 16) & 0xFF0000) | ((g << 8) & 0xFF00) | (b & 0xFF);
|
||||
LightState lightState = new LightState.Builder().setColor(argbValue).build();
|
||||
deviceContext.ledArgbValue = 0xFF000000 | ((r << 16) & 0xFF0000) | ((g << 8) & 0xFF00) | (b & 0xFF);
|
||||
|
||||
// Set the RGB value for each RGB-controllable LED on the device
|
||||
LightsRequest.Builder lightsRequestBuilder = new LightsRequest.Builder();
|
||||
for (Light light : deviceContext.inputDevice.getLightsManager().getLights()) {
|
||||
if (light.hasRgbControl()) {
|
||||
lightsRequestBuilder.addLight(light, lightState);
|
||||
}
|
||||
}
|
||||
|
||||
// Apply the LED changes
|
||||
deviceContext.lightsSession.requestLights(lightsRequestBuilder.build());
|
||||
backgroundThreadHandler.removeCallbacks(deviceContext.setLedStateRunnable);
|
||||
backgroundThreadHandler.post(deviceContext.setLedStateRunnable);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2855,9 +2896,19 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
return;
|
||||
}
|
||||
|
||||
// Send mouse movement events from analog sticks
|
||||
sendEmulatedMouseEvent(leftStickX, leftStickY);
|
||||
sendEmulatedMouseEvent(rightStickX, rightStickY);
|
||||
// Send mouse events from analog sticks
|
||||
if (prefConfig.analogStickForScrolling == PreferenceConfiguration.AnalogStickForScrolling.RIGHT) {
|
||||
sendEmulatedMouseMove(leftStickX, leftStickY);
|
||||
sendEmulatedMouseScroll(rightStickX, rightStickY);
|
||||
}
|
||||
else if (prefConfig.analogStickForScrolling == PreferenceConfiguration.AnalogStickForScrolling.LEFT) {
|
||||
sendEmulatedMouseMove(rightStickX, rightStickY);
|
||||
sendEmulatedMouseScroll(leftStickX, leftStickY);
|
||||
}
|
||||
else {
|
||||
sendEmulatedMouseMove(leftStickX, leftStickY);
|
||||
sendEmulatedMouseMove(rightStickX, rightStickY);
|
||||
}
|
||||
|
||||
// Requeue the callback
|
||||
mainThreadHandler.postDelayed(this, mouseEmulationReportPeriod);
|
||||
@@ -2898,7 +2949,9 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
|
||||
public InputDevice inputDevice;
|
||||
|
||||
public boolean hasRgbLed;
|
||||
public LightsManager.LightsSession lightsSession;
|
||||
public int ledArgbValue;
|
||||
|
||||
// These are BatteryState values, not Moonlight values
|
||||
public int lastReportedBatteryStatus;
|
||||
@@ -2975,6 +3028,34 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
}
|
||||
};
|
||||
|
||||
public final Runnable setLedStateRunnable = new Runnable() {
|
||||
@TargetApi(Build.VERSION_CODES.S)
|
||||
@Override
|
||||
public void run() {
|
||||
LightState lightState = new LightState.Builder().setColor(ledArgbValue).build();
|
||||
|
||||
// Set the RGB value for each RGB-controllable LED on the device
|
||||
boolean hasRgbLight = false;
|
||||
LightsRequest.Builder lightsRequestBuilder = new LightsRequest.Builder();
|
||||
for (Light light : inputDevice.getLightsManager().getLights()) {
|
||||
if (light.hasRgbControl()) {
|
||||
lightsRequestBuilder.addLight(light, lightState);
|
||||
hasRgbLight = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (hasRgbLight) {
|
||||
// Create a new light session if one doesn't already exist
|
||||
if (lightsSession == null) {
|
||||
lightsSession = inputDevice.getLightsManager().openSession();
|
||||
}
|
||||
|
||||
// Apply the LED changes
|
||||
lightsSession.requestLights(lightsRequestBuilder.build());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
super.destroy();
|
||||
@@ -2987,6 +3068,7 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
}
|
||||
|
||||
backgroundThreadHandler.removeCallbacks(enableSensorRunnable);
|
||||
backgroundThreadHandler.removeCallbacks(setLedStateRunnable);
|
||||
|
||||
if (gyroListener != null) {
|
||||
sensorManager.unregisterListener(gyroListener);
|
||||
@@ -2997,7 +3079,11 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
if (lightsSession != null) {
|
||||
lightsSession.close();
|
||||
try {
|
||||
lightsSession.close();
|
||||
} catch (RuntimeException e) {
|
||||
LimeLog.warning("Error closing LightsSession: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3006,11 +3092,6 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
|
||||
@Override
|
||||
public void sendControllerArrival() {
|
||||
// Below KitKat we can't get enough information to report controller details accurately
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) {
|
||||
return;
|
||||
}
|
||||
|
||||
byte type;
|
||||
switch (inputDevice.getVendorId()) {
|
||||
case 0x045e: // Microsoft
|
||||
@@ -3065,19 +3146,17 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
capabilities |= MoonBridge.LI_CCAP_RUMBLE;
|
||||
}
|
||||
|
||||
if (inputDevice.getBatteryState().isPresent()) {
|
||||
// Calling InputDevice.getBatteryState() to see if a battery is present
|
||||
// performs a Binder transaction that can cause ANRs on some devices.
|
||||
// To avoid this, we will just claim we can report battery state for all
|
||||
// external gamepad devices on Android S. If it turns out that no battery
|
||||
// is actually present, we'll just report unknown battery state to the host.
|
||||
if (external) {
|
||||
capabilities |= MoonBridge.LI_CCAP_BATTERY_STATE;
|
||||
}
|
||||
|
||||
for (Light light : inputDevice.getLightsManager().getLights()) {
|
||||
if (light.hasRgbControl()) {
|
||||
// Light.hasRgbControl() was totally broken prior to Android 14.
|
||||
// It always returned true because LIGHT_CAPABILITY_RGB was defined as 0,
|
||||
// so we will just guess RGB is supported if it's a PlayStation controller.
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE || type == MoonBridge.LI_CTYPE_PS) {
|
||||
capabilities |= MoonBridge.LI_CCAP_RGB_LED;
|
||||
}
|
||||
}
|
||||
if (hasRgbLed) {
|
||||
capabilities |= MoonBridge.LI_CCAP_RGB_LED;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3140,6 +3219,7 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
this.lightsSession = oldContext.lightsSession;
|
||||
oldContext.lightsSession = null;
|
||||
}
|
||||
this.ledArgbValue = oldContext.ledArgbValue;
|
||||
this.gyroReportRateHz = oldContext.gyroReportRateHz;
|
||||
this.accelReportRateHz = oldContext.accelReportRateHz;
|
||||
|
||||
@@ -3164,6 +3244,12 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
// Re-enable sensors on the new context
|
||||
enableSensors();
|
||||
|
||||
// Refresh the LED state if it's set. We don't know if there was a pending LED state
|
||||
// callback when the context was migrated, so we'll reset it just to be safe.
|
||||
if (this.lightsSession != null) {
|
||||
backgroundThreadHandler.post(setLedStateRunnable);
|
||||
}
|
||||
|
||||
// Refresh battery state and start the battery state polling again
|
||||
backgroundThreadHandler.post(batteryStateUpdateRunnable);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.limelight.binding.input;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.annotation.TargetApi;
|
||||
import android.hardware.input.InputManager;
|
||||
import android.os.Build;
|
||||
@@ -34,6 +35,7 @@ public class KeyboardTranslator implements InputManager.InputDeviceListener {
|
||||
public static final int VK_EQUALS = 61;
|
||||
public static final int VK_ESCAPE = 27;
|
||||
public static final int VK_F1 = 112;
|
||||
public static final int VK_F13 = 0x7C;
|
||||
public static final int VK_END = 35;
|
||||
public static final int VK_HOME = 36;
|
||||
public static final int VK_NUM_LOCK = 144;
|
||||
@@ -126,6 +128,7 @@ public class KeyboardTranslator implements InputManager.InputDeviceListener {
|
||||
* @param deviceId InputDevice.getId() or -1 if unknown
|
||||
* @return a GFE keycode for the given keycode
|
||||
*/
|
||||
@SuppressLint("InlinedApi")
|
||||
public short translate(int keycode, int deviceId) {
|
||||
int translated;
|
||||
|
||||
@@ -161,6 +164,10 @@ public class KeyboardTranslator implements InputManager.InputDeviceListener {
|
||||
keycode <= KeyEvent.KEYCODE_F12) {
|
||||
translated = (keycode - KeyEvent.KEYCODE_F1) + VK_F1;
|
||||
}
|
||||
else if (keycode >= KeyEvent.KEYCODE_F13 &&
|
||||
keycode <= KeyEvent.KEYCODE_F24) {
|
||||
translated = (keycode - KeyEvent.KEYCODE_F13) + VK_F13;
|
||||
}
|
||||
else {
|
||||
switch (keycode) {
|
||||
case KeyEvent.KEYCODE_ALT_LEFT:
|
||||
@@ -349,6 +356,14 @@ public class KeyboardTranslator implements InputManager.InputDeviceListener {
|
||||
translated = 0x6E;
|
||||
break;
|
||||
|
||||
case KeyEvent.KEYCODE_PRINT:
|
||||
translated = 0x2A;
|
||||
break;
|
||||
|
||||
case KeyEvent.KEYCODE_SCREENSHOT:
|
||||
translated = 0x2C;
|
||||
break;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
+3
@@ -65,6 +65,9 @@ public class AndroidNativePointerCaptureProvider extends AndroidPointerIconCaptu
|
||||
public void showCursor() {
|
||||
super.showCursor();
|
||||
|
||||
// It is important to unregister the listener *before* releasing pointer capture,
|
||||
// because releasing pointer capture can cause an onInputDeviceChanged() callback
|
||||
// for devices with a touchpad (like a DS4 controller).
|
||||
inputManager.unregisterInputDeviceListener(this);
|
||||
targetView.releasePointerCapture();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.limelight.binding.input.driver;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.PendingIntent;
|
||||
import android.app.Service;
|
||||
import android.content.BroadcastReceiver;
|
||||
@@ -210,28 +211,22 @@ public class UsbDriverService extends Service implements UsbDriverListener {
|
||||
}
|
||||
|
||||
public static boolean isRecognizedInputDevice(UsbDevice device) {
|
||||
// On KitKat and later, we can determine if this VID and PID combo
|
||||
// matches an existing input device and defer to the built-in controller
|
||||
// support in that case. Prior to KitKat, we'll always return true to be safe.
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
for (int id : InputDevice.getDeviceIds()) {
|
||||
InputDevice inputDev = InputDevice.getDevice(id);
|
||||
if (inputDev == null) {
|
||||
// Device was removed while looping
|
||||
continue;
|
||||
}
|
||||
|
||||
if (inputDev.getVendorId() == device.getVendorId() &&
|
||||
inputDev.getProductId() == device.getProductId()) {
|
||||
return true;
|
||||
}
|
||||
// Determine if this VID and PID combo matches an existing input device
|
||||
// and defer to the built-in controller support in that case.
|
||||
for (int id : InputDevice.getDeviceIds()) {
|
||||
InputDevice inputDev = InputDevice.getDevice(id);
|
||||
if (inputDev == null) {
|
||||
// Device was removed while looping
|
||||
continue;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
return true;
|
||||
if (inputDev.getVendorId() == device.getVendorId() &&
|
||||
inputDev.getProductId() == device.getProductId()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean kernelSupportsXboxOne() {
|
||||
@@ -286,6 +281,7 @@ public class UsbDriverService extends Service implements UsbDriverListener {
|
||||
((!kernelSupportsXbox360W() || claimAllAvailable) && Xbox360WirelessDongle.canClaimDevice(device));
|
||||
}
|
||||
|
||||
@SuppressLint("UnspecifiedRegisterReceiverFlag")
|
||||
private void start() {
|
||||
if (started || usbManager == null) {
|
||||
return;
|
||||
|
||||
@@ -39,6 +39,7 @@ public class Xbox360Controller extends AbstractXboxController {
|
||||
0x20d6, // PowerA
|
||||
0x24c6, // PowerA
|
||||
0x2f24, // GameSir
|
||||
0x2dc8, // 8BitDo
|
||||
};
|
||||
|
||||
public static boolean canClaimDevice(UsbDevice device) {
|
||||
|
||||
@@ -89,28 +89,26 @@ public class Xbox360WirelessDongle extends AbstractController {
|
||||
public boolean start() {
|
||||
int controllerIndex = 0;
|
||||
|
||||
// On KitKat, there is a controller number associated with input devices.
|
||||
// On Android, there is a controller number associated with input devices.
|
||||
// We can use this to approximate the likely controller number. This won't
|
||||
// be completely accurate because there's no guarantee the order of interfaces
|
||||
// matches the order that devices were enumerated by xpad, but it's probably
|
||||
// better than nothing.
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
for (int id : InputDevice.getDeviceIds()) {
|
||||
InputDevice inputDev = InputDevice.getDevice(id);
|
||||
if (inputDev == null) {
|
||||
// Device was removed while looping
|
||||
continue;
|
||||
}
|
||||
for (int id : InputDevice.getDeviceIds()) {
|
||||
InputDevice inputDev = InputDevice.getDevice(id);
|
||||
if (inputDev == null) {
|
||||
// Device was removed while looping
|
||||
continue;
|
||||
}
|
||||
|
||||
// Newer xpad versions use a special product ID (0x02a1) for controllers
|
||||
// rather than copying the product ID of the dongle itself.
|
||||
if (inputDev.getVendorId() == device.getVendorId() &&
|
||||
(inputDev.getProductId() == device.getProductId() ||
|
||||
inputDev.getProductId() == 0x02a1) &&
|
||||
inputDev.getControllerNumber() > 0) {
|
||||
controllerIndex = inputDev.getControllerNumber() - 1;
|
||||
break;
|
||||
}
|
||||
// Newer xpad versions use a special product ID (0x02a1) for controllers
|
||||
// rather than copying the product ID of the dongle itself.
|
||||
if (inputDev.getVendorId() == device.getVendorId() &&
|
||||
(inputDev.getProductId() == device.getProductId() ||
|
||||
inputDev.getProductId() == 0x02a1) &&
|
||||
inputDev.getControllerNumber() > 0) {
|
||||
controllerIndex = inputDev.getControllerNumber() - 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -25,10 +25,12 @@ public class XboxOneController extends AbstractXboxController {
|
||||
0x20d6, // PowerA
|
||||
0x24c6, // PowerA
|
||||
0x2e24, // Hyperkin
|
||||
0x2dc8, // 8BitDo
|
||||
};
|
||||
|
||||
private static final byte[] FW2015_INIT = {0x05, 0x20, 0x00, 0x01, 0x00};
|
||||
private static final byte[] ONE_S_INIT = {0x05, 0x20, 0x00, 0x0f, 0x06};
|
||||
private static final byte[] SERIES_S_INIT = {0x05, 0x20, 0x00, 0x0f, 0x06};
|
||||
private static final byte[] HORI_INIT = {0x01, 0x20, 0x00, 0x09, 0x00, 0x04, 0x20, 0x3a,
|
||||
0x00, 0x00, 0x00, (byte)0x80, 0x00};
|
||||
private static final byte[] PDP_INIT1 = {0x0a, 0x20, 0x00, 0x03, 0x00, 0x01, 0x14};
|
||||
@@ -43,7 +45,11 @@ public class XboxOneController extends AbstractXboxController {
|
||||
new InitPacket(0x0f0d, 0x0067, HORI_INIT),
|
||||
new InitPacket(0x0000, 0x0000, FW2015_INIT),
|
||||
new InitPacket(0x045e, 0x02ea, ONE_S_INIT),
|
||||
new InitPacket(0x045e, 0x02fe, ONE_S_INIT),
|
||||
new InitPacket(0x045e, 0x0b00, ONE_S_INIT),
|
||||
new InitPacket(0x045e, 0x0b05, SERIES_S_INIT),
|
||||
new InitPacket(0x045e, 0x0b12, SERIES_S_INIT),
|
||||
new InitPacket(0x045e, 0x0b13, SERIES_S_INIT),
|
||||
new InitPacket(0x0e6f, 0x0000, PDP_INIT1),
|
||||
new InitPacket(0x0e6f, 0x0000, PDP_INIT2),
|
||||
new InitPacket(0x24c6, 0x541a, RUMBLE_INIT1),
|
||||
|
||||
+14
@@ -185,6 +185,10 @@ public class VirtualControllerConfigurationLoader {
|
||||
private static final int START_BACK_WIDTH = 12;
|
||||
private static final int START_BACK_HEIGHT = 7;
|
||||
|
||||
// Make the Guide Menu be in the center of START and BACK menu
|
||||
private static final int GUIDE_X = START_X-BACK_X;
|
||||
private static final int GUIDE_Y = START_BACK_Y;
|
||||
|
||||
public static void createDefaultLayout(final VirtualController controller, final Context context) {
|
||||
|
||||
DisplayMetrics screen = context.getResources().getDisplayMetrics();
|
||||
@@ -333,6 +337,16 @@ public class VirtualControllerConfigurationLoader {
|
||||
);
|
||||
}
|
||||
|
||||
if(config.showGuideButton){
|
||||
controller.addElement(createDigitalButton(VirtualControllerElement.EID_GDB,
|
||||
ControllerPacket.SPECIAL_BUTTON_FLAG, 0, 1, "GUIDE", -1, controller, context),
|
||||
screenScale(GUIDE_X, height)+ rightDisplacement,
|
||||
screenScale(GUIDE_Y, height),
|
||||
screenScale(START_BACK_WIDTH, height),
|
||||
screenScale(START_BACK_HEIGHT, height)
|
||||
);
|
||||
}
|
||||
|
||||
controller.setOpacity(config.oscOpacity);
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -35,6 +35,7 @@ public abstract class VirtualControllerElement extends View {
|
||||
public static final int EID_RS = 13;
|
||||
public static final int EID_LSB = 14;
|
||||
public static final int EID_RSB = 15;
|
||||
public static final int EID_GDB = 16;
|
||||
|
||||
protected VirtualController virtualController;
|
||||
protected final int elementId;
|
||||
|
||||
@@ -42,9 +42,6 @@ public class MediaCodecDecoderRenderer extends VideoDecoderRenderer implements C
|
||||
private static final boolean USE_FRAME_RENDER_TIME = false;
|
||||
private static final boolean FRAME_RENDER_TIME_ONLY = USE_FRAME_RENDER_TIME && false;
|
||||
|
||||
// Used on versions < 5.0
|
||||
private ByteBuffer[] legacyInputBuffers;
|
||||
|
||||
private MediaCodecInfo avcDecoder;
|
||||
private MediaCodecInfo hevcDecoder;
|
||||
private MediaCodecInfo av1Decoder;
|
||||
@@ -113,6 +110,7 @@ public class MediaCodecDecoderRenderer extends VideoDecoderRenderer implements C
|
||||
|
||||
private long lastTimestampUs;
|
||||
private int lastFrameNumber;
|
||||
private long baseTimestampUs;
|
||||
private int refreshRate;
|
||||
private PreferenceConfiguration prefs;
|
||||
|
||||
@@ -136,7 +134,6 @@ public class MediaCodecDecoderRenderer extends VideoDecoderRenderer implements C
|
||||
return decoder;
|
||||
}
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
private boolean decoderCanMeetPerformancePoint(MediaCodecInfo.VideoCapabilities caps, PreferenceConfiguration prefs) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
MediaCodecInfo.VideoCapabilities.PerformancePoint targetPerfPoint = new MediaCodecInfo.VideoCapabilities.PerformancePoint(prefs.width, prefs.height, prefs.fps);
|
||||
@@ -179,42 +176,24 @@ public class MediaCodecDecoderRenderer extends VideoDecoderRenderer implements C
|
||||
}
|
||||
|
||||
private boolean decoderCanMeetPerformancePointWithHevcAndNotAvc(MediaCodecInfo hevcDecoderInfo, MediaCodecInfo avcDecoderInfo, PreferenceConfiguration prefs) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
MediaCodecInfo.VideoCapabilities avcCaps = avcDecoderInfo.getCapabilitiesForType("video/avc").getVideoCapabilities();
|
||||
MediaCodecInfo.VideoCapabilities hevcCaps = hevcDecoderInfo.getCapabilitiesForType("video/hevc").getVideoCapabilities();
|
||||
MediaCodecInfo.VideoCapabilities avcCaps = avcDecoderInfo.getCapabilitiesForType("video/avc").getVideoCapabilities();
|
||||
MediaCodecInfo.VideoCapabilities hevcCaps = hevcDecoderInfo.getCapabilitiesForType("video/hevc").getVideoCapabilities();
|
||||
|
||||
return !decoderCanMeetPerformancePoint(avcCaps, prefs) && decoderCanMeetPerformancePoint(hevcCaps, prefs);
|
||||
}
|
||||
else {
|
||||
// No performance data
|
||||
return false;
|
||||
}
|
||||
return !decoderCanMeetPerformancePoint(avcCaps, prefs) && decoderCanMeetPerformancePoint(hevcCaps, prefs);
|
||||
}
|
||||
|
||||
private boolean decoderCanMeetPerformancePointWithAv1AndNotHevc(MediaCodecInfo av1DecoderInfo, MediaCodecInfo hevcDecoderInfo, PreferenceConfiguration prefs) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
MediaCodecInfo.VideoCapabilities av1Caps = av1DecoderInfo.getCapabilitiesForType("video/av01").getVideoCapabilities();
|
||||
MediaCodecInfo.VideoCapabilities hevcCaps = hevcDecoderInfo.getCapabilitiesForType("video/hevc").getVideoCapabilities();
|
||||
MediaCodecInfo.VideoCapabilities av1Caps = av1DecoderInfo.getCapabilitiesForType("video/av01").getVideoCapabilities();
|
||||
MediaCodecInfo.VideoCapabilities hevcCaps = hevcDecoderInfo.getCapabilitiesForType("video/hevc").getVideoCapabilities();
|
||||
|
||||
return !decoderCanMeetPerformancePoint(hevcCaps, prefs) && decoderCanMeetPerformancePoint(av1Caps, prefs);
|
||||
}
|
||||
else {
|
||||
// No performance data
|
||||
return false;
|
||||
}
|
||||
return !decoderCanMeetPerformancePoint(hevcCaps, prefs) && decoderCanMeetPerformancePoint(av1Caps, prefs);
|
||||
}
|
||||
|
||||
private boolean decoderCanMeetPerformancePointWithAv1AndNotAvc(MediaCodecInfo av1DecoderInfo, MediaCodecInfo avcDecoderInfo, PreferenceConfiguration prefs) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
MediaCodecInfo.VideoCapabilities avcCaps = avcDecoderInfo.getCapabilitiesForType("video/avc").getVideoCapabilities();
|
||||
MediaCodecInfo.VideoCapabilities av1Caps = av1DecoderInfo.getCapabilitiesForType("video/av01").getVideoCapabilities();
|
||||
MediaCodecInfo.VideoCapabilities avcCaps = avcDecoderInfo.getCapabilitiesForType("video/avc").getVideoCapabilities();
|
||||
MediaCodecInfo.VideoCapabilities av1Caps = av1DecoderInfo.getCapabilitiesForType("video/av01").getVideoCapabilities();
|
||||
|
||||
return !decoderCanMeetPerformancePoint(avcCaps, prefs) && decoderCanMeetPerformancePoint(av1Caps, prefs);
|
||||
}
|
||||
else {
|
||||
// No performance data
|
||||
return false;
|
||||
}
|
||||
return !decoderCanMeetPerformancePoint(avcCaps, prefs) && decoderCanMeetPerformancePoint(av1Caps, prefs);
|
||||
}
|
||||
|
||||
private MediaCodecInfo findHevcDecoder(PreferenceConfiguration prefs, boolean meteredNetwork, boolean requestedHdr) {
|
||||
@@ -471,9 +450,8 @@ public class MediaCodecDecoderRenderer extends VideoDecoderRenderer implements C
|
||||
videoFormat.setInteger(MediaFormat.KEY_FRAME_RATE, refreshRate);
|
||||
}
|
||||
|
||||
// Adaptive playback can also be enabled by the whitelist on pre-KitKat devices
|
||||
// so we don't fill these pre-KitKat
|
||||
if (adaptivePlayback && Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
// Populate keys for adaptive playback
|
||||
if (adaptivePlayback) {
|
||||
videoFormat.setInteger(MediaFormat.KEY_MAX_WIDTH, initialWidth);
|
||||
videoFormat.setInteger(MediaFormat.KEY_MAX_HEIGHT, initialHeight);
|
||||
}
|
||||
@@ -486,7 +464,7 @@ public class MediaCodecDecoderRenderer extends VideoDecoderRenderer implements C
|
||||
|
||||
// If the stream is HDR-capable, the decoder will detect transitions in color standards
|
||||
// rather than us hardcoding them into the MediaFormat.
|
||||
if (getActiveVideoFormat() != MoonBridge.VIDEO_FORMAT_H265_MAIN10) {
|
||||
if ((getActiveVideoFormat() & MoonBridge.VIDEO_FORMAT_MASK_10BIT) == 0) {
|
||||
// Set color format keys when not in HDR mode, since we know they won't change
|
||||
videoFormat.setInteger(MediaFormat.KEY_COLOR_TRANSFER, MediaFormat.COLOR_TRANSFER_SDR_VIDEO);
|
||||
switch (getPreferredColorSpace()) {
|
||||
@@ -548,20 +526,15 @@ public class MediaCodecDecoderRenderer extends VideoDecoderRenderer implements C
|
||||
spsBuffers.clear();
|
||||
ppsBuffers.clear();
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
// This will contain the actual accepted input format attributes
|
||||
inputFormat = videoDecoder.getInputFormat();
|
||||
LimeLog.info("Input format: "+inputFormat);
|
||||
}
|
||||
// This will contain the actual accepted input format attributes
|
||||
inputFormat = videoDecoder.getInputFormat();
|
||||
LimeLog.info("Input format: "+inputFormat);
|
||||
|
||||
videoDecoder.setVideoScalingMode(MediaCodec.VIDEO_SCALING_MODE_SCALE_TO_FIT);
|
||||
|
||||
// Start the decoder
|
||||
videoDecoder.start();
|
||||
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
|
||||
legacyInputBuffers = videoDecoder.getInputBuffers();
|
||||
}
|
||||
}
|
||||
|
||||
private boolean tryConfigureDecoder(MediaCodecInfo selectedDecoderInfo, MediaFormat format, boolean throwOnCodecError) {
|
||||
@@ -781,7 +754,7 @@ public class MediaCodecDecoderRenderer extends VideoDecoderRenderer implements C
|
||||
|
||||
// For "non-recoverable" exceptions on L+, we can call reset() to recover
|
||||
// without having to recreate the entire decoder again.
|
||||
if (codecRecoveryType.get() == CR_RECOVERY_TYPE_RESET && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
if (codecRecoveryType.get() == CR_RECOVERY_TYPE_RESET) {
|
||||
LimeLog.warning("Trying to reset decoder after CodecException");
|
||||
try {
|
||||
videoDecoder.reset();
|
||||
@@ -864,7 +837,7 @@ public class MediaCodecDecoderRenderer extends VideoDecoderRenderer implements C
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && e instanceof CodecException) {
|
||||
if (e instanceof CodecException) {
|
||||
CodecException codecExc = (CodecException) e;
|
||||
|
||||
if (codecExc.isTransient()) {
|
||||
@@ -978,9 +951,7 @@ public class MediaCodecDecoderRenderer extends VideoDecoderRenderer implements C
|
||||
return;
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
frameTimeNanos -= activity.getWindowManager().getDefaultDisplay().getAppVsyncOffsetNanos();
|
||||
}
|
||||
frameTimeNanos -= activity.getWindowManager().getDefaultDisplay().getAppVsyncOffsetNanos();
|
||||
|
||||
// Don't render unless a new frame is due. This prevents microstutter when streaming
|
||||
// at a frame rate that doesn't match the display (such as 60 FPS on 120 Hz).
|
||||
@@ -995,12 +966,7 @@ public class MediaCodecDecoderRenderer extends VideoDecoderRenderer implements C
|
||||
Integer nextOutputBuffer = outputBufferQueue.poll();
|
||||
if (nextOutputBuffer != null) {
|
||||
try {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
videoDecoder.releaseOutputBuffer(nextOutputBuffer, frameTimeNanos);
|
||||
}
|
||||
else {
|
||||
videoDecoder.releaseOutputBuffer(nextOutputBuffer, true);
|
||||
}
|
||||
videoDecoder.releaseOutputBuffer(nextOutputBuffer, frameTimeNanos);
|
||||
|
||||
lastRenderedFrameTimeNanos = frameTimeNanos;
|
||||
activeWindowVideoStats.totalFramesRendered++;
|
||||
@@ -1076,23 +1042,13 @@ public class MediaCodecDecoderRenderer extends VideoDecoderRenderer implements C
|
||||
if (prefs.framePacing == PreferenceConfiguration.FRAME_PACING_MAX_SMOOTHNESS ||
|
||||
prefs.framePacing == PreferenceConfiguration.FRAME_PACING_CAP_FPS) {
|
||||
// In max smoothness or cap FPS mode, we want to never drop frames
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
// Use a PTS that will cause this frame to never be dropped
|
||||
videoDecoder.releaseOutputBuffer(lastIndex, 0);
|
||||
}
|
||||
else {
|
||||
videoDecoder.releaseOutputBuffer(lastIndex, true);
|
||||
}
|
||||
// Use a PTS that will cause this frame to never be dropped
|
||||
videoDecoder.releaseOutputBuffer(lastIndex, 0);
|
||||
}
|
||||
else {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
// Use a PTS that will cause this frame to be dropped if another comes in within
|
||||
// the same V-sync period
|
||||
videoDecoder.releaseOutputBuffer(lastIndex, System.nanoTime());
|
||||
}
|
||||
else {
|
||||
videoDecoder.releaseOutputBuffer(lastIndex, true);
|
||||
}
|
||||
// Use a PTS that will cause this frame to be dropped if another comes in within
|
||||
// the same V-sync period
|
||||
videoDecoder.releaseOutputBuffer(lastIndex, System.nanoTime());
|
||||
}
|
||||
|
||||
activeWindowVideoStats.totalFramesRendered++;
|
||||
@@ -1175,20 +1131,12 @@ public class MediaCodecDecoderRenderer extends VideoDecoderRenderer implements C
|
||||
if (nextInputBufferIndex >= 0) {
|
||||
// Using the new getInputBuffer() API on Lollipop allows
|
||||
// the framework to do some performance optimizations for us
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
nextInputBuffer = videoDecoder.getInputBuffer(nextInputBufferIndex);
|
||||
if (nextInputBuffer == null) {
|
||||
// According to the Android docs, getInputBuffer() can return null "if the
|
||||
// index is not a dequeued input buffer". I don't think this ever should
|
||||
// happen but if it does, let's try to get a new input buffer next time.
|
||||
nextInputBufferIndex = -1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
nextInputBuffer = legacyInputBuffers[nextInputBufferIndex];
|
||||
|
||||
// Clear old input data pre-Lollipop
|
||||
nextInputBuffer.clear();
|
||||
nextInputBuffer = videoDecoder.getInputBuffer(nextInputBufferIndex);
|
||||
if (nextInputBuffer == null) {
|
||||
// According to the Android docs, getInputBuffer() can return null "if the
|
||||
// index is not a dequeued input buffer". I don't think this ever should
|
||||
// happen but if it does, let's try to get a new input buffer next time.
|
||||
nextInputBufferIndex = -1;
|
||||
}
|
||||
}
|
||||
} catch (IllegalStateException e) {
|
||||
@@ -1386,7 +1334,7 @@ public class MediaCodecDecoderRenderer extends VideoDecoderRenderer implements C
|
||||
sps.constraintSet4Flag = true;
|
||||
sps.constraintSet5Flag = true;
|
||||
}
|
||||
else {
|
||||
else if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
|
||||
// Force the constraints unset otherwise (some may be set by default)
|
||||
sps.constraintSet4Flag = false;
|
||||
sps.constraintSet5Flag = false;
|
||||
@@ -1397,7 +1345,7 @@ public class MediaCodecDecoderRenderer extends VideoDecoderRenderer implements C
|
||||
@Override
|
||||
public int submitDecodeUnit(byte[] decodeUnitData, int decodeUnitLength, int decodeUnitType,
|
||||
int frameNumber, int frameType, char frameHostProcessingLatency,
|
||||
long receiveTimeMs, long enqueueTimeMs) {
|
||||
long receiveTimeUs, long enqueueTimeUs) {
|
||||
if (stopping) {
|
||||
// Don't bother if we're stopping
|
||||
return MoonBridge.DR_OK;
|
||||
@@ -1490,7 +1438,7 @@ public class MediaCodecDecoderRenderer extends VideoDecoderRenderer implements C
|
||||
// Since we only need one frame buffered, we'll set the level as low as we can
|
||||
// for known resolution combinations. Reference frame invalidation may need
|
||||
// these, so leave them be for those decoders.
|
||||
if (!refFrameInvalidationActive) {
|
||||
if (!refFrameInvalidationActive && Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
|
||||
if (initialWidth <= 720 && initialHeight <= 480 && refreshRate <= 60) {
|
||||
// Max 5 buffered frames at 720x480x60
|
||||
LimeLog.info("Patching level_idc to 31");
|
||||
@@ -1696,7 +1644,7 @@ public class MediaCodecDecoderRenderer extends VideoDecoderRenderer implements C
|
||||
// Count time from first packet received to enqueue time as receive time
|
||||
// We will count DU queue time as part of decoding, because it is directly
|
||||
// caused by a slow decoder.
|
||||
activeWindowVideoStats.totalTimeMs += enqueueTimeMs - receiveTimeMs;
|
||||
activeWindowVideoStats.totalTimeMs += (enqueueTimeUs - receiveTimeUs) / 1000;
|
||||
}
|
||||
|
||||
if (!fetchNextInputBuffer()) {
|
||||
@@ -1722,7 +1670,12 @@ public class MediaCodecDecoderRenderer extends VideoDecoderRenderer implements C
|
||||
}
|
||||
}
|
||||
|
||||
long timestampUs = enqueueTimeMs * 1000;
|
||||
// The frame timestamps use an undefined epoch, so normalize them to uptime microseconds.
|
||||
if (baseTimestampUs == 0) {
|
||||
baseTimestampUs = (SystemClock.uptimeMillis() * 1000) - enqueueTimeUs;
|
||||
}
|
||||
|
||||
long timestampUs = baseTimestampUs + enqueueTimeUs;
|
||||
if (timestampUs <= lastTimestampUs) {
|
||||
// We can't submit multiple buffers with the same timestamp
|
||||
// so bump it up by one before queuing
|
||||
@@ -1878,7 +1831,7 @@ public class MediaCodecDecoderRenderer extends VideoDecoderRenderer implements C
|
||||
str += "AVC Decoder: "+((renderer.avcDecoder != null) ? renderer.avcDecoder.getName():"(none)")+DELIMITER;
|
||||
str += "HEVC Decoder: "+((renderer.hevcDecoder != null) ? renderer.hevcDecoder.getName():"(none)")+DELIMITER;
|
||||
str += "AV1 Decoder: "+((renderer.av1Decoder != null) ? renderer.av1Decoder.getName():"(none)")+DELIMITER;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && renderer.avcDecoder != null) {
|
||||
if (renderer.avcDecoder != null) {
|
||||
Range<Integer> avcWidthRange = renderer.avcDecoder.getCapabilitiesForType("video/avc").getVideoCapabilities().getSupportedWidths();
|
||||
str += "AVC supported width range: "+avcWidthRange+DELIMITER;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
@@ -1890,7 +1843,7 @@ public class MediaCodecDecoderRenderer extends VideoDecoderRenderer implements C
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && renderer.hevcDecoder != null) {
|
||||
if (renderer.hevcDecoder != null) {
|
||||
Range<Integer> hevcWidthRange = renderer.hevcDecoder.getCapabilitiesForType("video/hevc").getVideoCapabilities().getSupportedWidths();
|
||||
str += "HEVC supported width range: "+hevcWidthRange+DELIMITER;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
@@ -1902,7 +1855,7 @@ public class MediaCodecDecoderRenderer extends VideoDecoderRenderer implements C
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && renderer.av1Decoder != null) {
|
||||
if (renderer.av1Decoder != null) {
|
||||
Range<Integer> av1WidthRange = renderer.av1Decoder.getCapabilitiesForType("video/av01").getVideoCapabilities().getSupportedWidths();
|
||||
str += "AV1 supported width range: "+av1WidthRange+DELIMITER;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
@@ -1951,17 +1904,15 @@ public class MediaCodecDecoderRenderer extends VideoDecoderRenderer implements C
|
||||
str += "Average hardware decoder latency: "+renderer.getAverageDecoderLatency()+"ms"+DELIMITER;
|
||||
str += "Frame pacing mode: "+renderer.prefs.framePacing+DELIMITER;
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
if (originalException instanceof CodecException) {
|
||||
CodecException ce = (CodecException) originalException;
|
||||
if (originalException instanceof CodecException) {
|
||||
CodecException ce = (CodecException) originalException;
|
||||
|
||||
str += "Diagnostic Info: "+ce.getDiagnosticInfo()+DELIMITER;
|
||||
str += "Recoverable: "+ce.isRecoverable()+DELIMITER;
|
||||
str += "Transient: "+ce.isTransient()+DELIMITER;
|
||||
str += "Diagnostic Info: " + ce.getDiagnosticInfo() + DELIMITER;
|
||||
str += "Recoverable: " + ce.isRecoverable() + DELIMITER;
|
||||
str += "Transient: " + ce.isTransient() + DELIMITER;
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
str += "Codec Error Code: "+ce.getErrorCode()+DELIMITER;
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
str += "Codec Error Code: " + ce.getErrorCode() + DELIMITER;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -596,45 +596,39 @@ public class MediaCodecHelper {
|
||||
|
||||
public static boolean decoderSupportsFusedIdrFrame(MediaCodecInfo decoderInfo, String mimeType) {
|
||||
// If adaptive playback is supported, we can submit new CSD together with a keyframe
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
try {
|
||||
if (decoderInfo.getCapabilitiesForType(mimeType).
|
||||
isFeatureSupported(CodecCapabilities.FEATURE_AdaptivePlayback))
|
||||
{
|
||||
LimeLog.info("Decoder supports fused IDR frames (FEATURE_AdaptivePlayback)");
|
||||
return true;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// Tolerate buggy codecs
|
||||
e.printStackTrace();
|
||||
try {
|
||||
if (decoderInfo.getCapabilitiesForType(mimeType).
|
||||
isFeatureSupported(CodecCapabilities.FEATURE_AdaptivePlayback)) {
|
||||
LimeLog.info("Decoder supports fused IDR frames (FEATURE_AdaptivePlayback)");
|
||||
return true;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// Tolerate buggy codecs
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean decoderSupportsAdaptivePlayback(MediaCodecInfo decoderInfo, String mimeType) {
|
||||
// Possibly enable adaptive playback on KitKat and above
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
if (isDecoderInList(blacklistedAdaptivePlaybackPrefixes, decoderInfo.getName())) {
|
||||
LimeLog.info("Decoder blacklisted for adaptive playback");
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
if (decoderInfo.getCapabilitiesForType(mimeType).
|
||||
isFeatureSupported(CodecCapabilities.FEATURE_AdaptivePlayback))
|
||||
{
|
||||
// This will make getCapabilities() return that adaptive playback is supported
|
||||
LimeLog.info("Adaptive playback supported (FEATURE_AdaptivePlayback)");
|
||||
return true;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// Tolerate buggy codecs
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (isDecoderInList(blacklistedAdaptivePlaybackPrefixes, decoderInfo.getName())) {
|
||||
LimeLog.info("Decoder blacklisted for adaptive playback");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
if (decoderInfo.getCapabilitiesForType(mimeType).
|
||||
isFeatureSupported(CodecCapabilities.FEATURE_AdaptivePlayback))
|
||||
{
|
||||
// This will make getCapabilities() return that adaptive playback is supported
|
||||
LimeLog.info("Adaptive playback supported (FEATURE_AdaptivePlayback)");
|
||||
return true;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// Tolerate buggy codecs
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -709,13 +703,6 @@ public class MediaCodecHelper {
|
||||
}
|
||||
|
||||
public static boolean decoderIsWhitelistedForHevc(MediaCodecInfo decoderInfo) {
|
||||
// Google didn't have official support for HEVC (or more importantly, a CTS test) until
|
||||
// Lollipop. I've seen some MediaTek devices on 4.4 crash when attempting to use HEVC,
|
||||
// so I'm restricting HEVC usage to Lollipop and higher.
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
|
||||
return false;
|
||||
}
|
||||
|
||||
//
|
||||
// Software decoders are terrible and we never want to use them.
|
||||
// We want to catch decoders like:
|
||||
@@ -784,17 +771,10 @@ public class MediaCodecHelper {
|
||||
@SuppressLint("NewApi")
|
||||
private static LinkedList<MediaCodecInfo> getMediaCodecList() {
|
||||
LinkedList<MediaCodecInfo> infoList = new LinkedList<>();
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
MediaCodecList mcl = new MediaCodecList(MediaCodecList.REGULAR_CODECS);
|
||||
Collections.addAll(infoList, mcl.getCodecInfos());
|
||||
}
|
||||
else {
|
||||
for (int i = 0; i < MediaCodecList.getCodecCount(); i++) {
|
||||
infoList.add(MediaCodecList.getCodecInfoAt(i));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
MediaCodecList mcl = new MediaCodecList(MediaCodecList.REGULAR_CODECS);
|
||||
Collections.addAll(infoList, mcl.getCodecInfos());
|
||||
|
||||
return infoList;
|
||||
}
|
||||
|
||||
|
||||
@@ -190,6 +190,35 @@ public class ComputerDatabaseManager {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a computer by name
|
||||
* NOTE: It is perfectly valid for multiple computers to have the same name,
|
||||
* this function will only return the first one it finds.
|
||||
* Consider using getComputerByUUID instead.
|
||||
* @param name The name of the computer
|
||||
* @see ComputerDatabaseManager#getComputerByUUID(String) for alternative.
|
||||
* @return The computer details, or null if no computer with that name exists
|
||||
*/
|
||||
public ComputerDetails getComputerByName(String name) {
|
||||
try (final Cursor c = computerDb.query(
|
||||
COMPUTER_TABLE_NAME, null, COMPUTER_NAME_COLUMN_NAME+"=?",
|
||||
new String[]{ name }, null, null, null)
|
||||
) {
|
||||
if (!c.moveToFirst()) {
|
||||
// No matching computer
|
||||
return null;
|
||||
}
|
||||
|
||||
return getComputerFromCursor(c);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a computer by UUID
|
||||
* @param uuid The UUID of the computer
|
||||
* @see ComputerDatabaseManager#getComputerByName(String) for alternative.
|
||||
* @return The computer details, or null if no computer with that UUID exists
|
||||
*/
|
||||
public ComputerDetails getComputerByUUID(String uuid) {
|
||||
try (final Cursor c = computerDb.query(
|
||||
COMPUTER_TABLE_NAME, null, COMPUTER_UUID_COLUMN_NAME+"=?",
|
||||
|
||||
@@ -341,57 +341,53 @@ public class ComputerManagerService extends Service {
|
||||
// Acquire the default network lock since we could be changing global process state
|
||||
defaultNetworkLock.lock();
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
// On Lollipop or later, we can bind our process to the underlying interface
|
||||
// to ensure our STUN request goes out on that interface or not at all (which is
|
||||
// preferable to getting a VPN endpoint address back).
|
||||
Network[] networks = connMgr.getAllNetworks();
|
||||
for (Network net : networks) {
|
||||
NetworkCapabilities netCaps = connMgr.getNetworkCapabilities(net);
|
||||
if (netCaps != null) {
|
||||
if (!netCaps.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR) &&
|
||||
!netCaps.hasTransport(NetworkCapabilities.TRANSPORT_VPN)) {
|
||||
// This network looks like an underlying multicast-capable transport,
|
||||
// so let's guess that it's probably where our mDNS response came from.
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
if (connMgr.bindProcessToNetwork(net)) {
|
||||
boundToNetwork = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (ConnectivityManager.setProcessDefaultNetwork(net)) {
|
||||
// On Lollipop or later, we can bind our process to the underlying interface
|
||||
// to ensure our STUN request goes out on that interface or not at all (which is
|
||||
// preferable to getting a VPN endpoint address back).
|
||||
Network[] networks = connMgr.getAllNetworks();
|
||||
for (Network net : networks) {
|
||||
NetworkCapabilities netCaps = connMgr.getNetworkCapabilities(net);
|
||||
if (netCaps != null) {
|
||||
if (!netCaps.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR) &&
|
||||
!netCaps.hasTransport(NetworkCapabilities.TRANSPORT_VPN)) {
|
||||
// This network looks like an underlying multicast-capable transport,
|
||||
// so let's guess that it's probably where our mDNS response came from.
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
if (connMgr.bindProcessToNetwork(net)) {
|
||||
boundToNetwork = true;
|
||||
break;
|
||||
}
|
||||
} else if (ConnectivityManager.setProcessDefaultNetwork(net)) {
|
||||
boundToNetwork = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Perform the STUN request if we're not on a VPN or if we bound to a network
|
||||
if (!activeNetworkIsVpn || boundToNetwork) {
|
||||
String stunResolvedAddress = NvConnection.findExternalAddressForMdns("stun.moonlight-stream.org", 3478);
|
||||
if (stunResolvedAddress != null) {
|
||||
// We don't know for sure what the external port is, so we will have to guess.
|
||||
// When we contact the PC (if we haven't already), it will update the port.
|
||||
details.remoteAddress = new ComputerDetails.AddressTuple(stunResolvedAddress, details.guessExternalPort());
|
||||
// Perform the STUN request if we're not on a VPN or if we bound to a network
|
||||
if (!activeNetworkIsVpn || boundToNetwork) {
|
||||
String stunResolvedAddress = NvConnection.findExternalAddressForMdns("stun.moonlight-stream.org", 3478);
|
||||
if (stunResolvedAddress != null) {
|
||||
// We don't know for sure what the external port is, so we will have to guess.
|
||||
// When we contact the PC (if we haven't already), it will update the port.
|
||||
details.remoteAddress = new ComputerDetails.AddressTuple(stunResolvedAddress, details.guessExternalPort());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Unbind from the network
|
||||
if (boundToNetwork) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
connMgr.bindProcessToNetwork(null);
|
||||
// Unbind from the network
|
||||
if (boundToNetwork) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
connMgr.bindProcessToNetwork(null);
|
||||
} else {
|
||||
ConnectivityManager.setProcessDefaultNetwork(null);
|
||||
}
|
||||
}
|
||||
else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
ConnectivityManager.setProcessDefaultNetwork(null);
|
||||
}
|
||||
}
|
||||
|
||||
// Unlock the network state
|
||||
if (activeNetworkIsVpn) {
|
||||
defaultNetworkLock.unlock();
|
||||
// Unlock the network state
|
||||
if (activeNetworkIsVpn) {
|
||||
defaultNetworkLock.unlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,14 +28,8 @@ public class DiskAssetLoader {
|
||||
|
||||
public DiskAssetLoader(Context context) {
|
||||
this.cacheDir = context.getCacheDir();
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
this.isLowRamDevice =
|
||||
((ActivityManager)context.getSystemService(Context.ACTIVITY_SERVICE)).isLowRamDevice();
|
||||
}
|
||||
else {
|
||||
// Use conservative low RAM behavior on very old devices
|
||||
this.isLowRamDevice = true;
|
||||
}
|
||||
this.isLowRamDevice =
|
||||
((ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE)).isLowRamDevice();
|
||||
}
|
||||
|
||||
public boolean checkCacheExists(CachedAppAssetLoader.LoaderTuple tuple) {
|
||||
|
||||
@@ -198,7 +198,7 @@ public class NvConnection {
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
else {
|
||||
NetworkInfo activeNetworkInfo = connMgr.getActiveNetworkInfo();
|
||||
if (activeNetworkInfo != null) {
|
||||
switch (activeNetworkInfo.getType()) {
|
||||
@@ -433,10 +433,7 @@ public class NvConnection {
|
||||
context.negotiatedPacketSize, context.negotiatedRemoteStreaming,
|
||||
context.streamConfig.getAudioConfiguration().toInt(),
|
||||
context.streamConfig.getSupportedVideoFormats(),
|
||||
context.streamConfig.getHevcBitratePercentageMultiplier(),
|
||||
context.streamConfig.getAv1BitratePercentageMultiplier(),
|
||||
context.streamConfig.getClientRefreshRateX100(),
|
||||
context.streamConfig.getEncryptionFlags(),
|
||||
context.riKey.getEncoded(), ib.array(),
|
||||
context.videoCapabilities,
|
||||
context.streamConfig.getColorSpace(),
|
||||
|
||||
@@ -23,8 +23,6 @@ public class StreamConfiguration {
|
||||
private int remote;
|
||||
private MoonBridge.AudioConfiguration audioConfiguration;
|
||||
private int supportedVideoFormats;
|
||||
private int hevcBitratePercentageMultiplier;
|
||||
private int av1BitratePercentageMultiplier;
|
||||
private int attachedGamepadMask;
|
||||
private int encryptionFlags;
|
||||
private int colorRange;
|
||||
@@ -85,16 +83,6 @@ public class StreamConfiguration {
|
||||
return this;
|
||||
}
|
||||
|
||||
public StreamConfiguration.Builder setHevcBitratePercentageMultiplier(int multiplier) {
|
||||
config.hevcBitratePercentageMultiplier = multiplier;
|
||||
return this;
|
||||
}
|
||||
|
||||
public StreamConfiguration.Builder setAv1BitratePercentageMultiplier(int multiplier) {
|
||||
config.av1BitratePercentageMultiplier = multiplier;
|
||||
return this;
|
||||
}
|
||||
|
||||
public StreamConfiguration.Builder setAttachedGamepadMask(int attachedGamepadMask) {
|
||||
config.attachedGamepadMask = attachedGamepadMask;
|
||||
return this;
|
||||
@@ -120,16 +108,6 @@ public class StreamConfiguration {
|
||||
return this;
|
||||
}
|
||||
|
||||
public StreamConfiguration.Builder setAudioEncryption(boolean enable) {
|
||||
if (enable) {
|
||||
config.encryptionFlags |= MoonBridge.ENCFLG_AUDIO;
|
||||
}
|
||||
else {
|
||||
config.encryptionFlags &= ~MoonBridge.ENCFLG_AUDIO;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public StreamConfiguration.Builder setAudioConfiguration(MoonBridge.AudioConfiguration audioConfig) {
|
||||
config.audioConfiguration = audioConfig;
|
||||
return this;
|
||||
@@ -224,14 +202,6 @@ public class StreamConfiguration {
|
||||
return supportedVideoFormats;
|
||||
}
|
||||
|
||||
public int getHevcBitratePercentageMultiplier() {
|
||||
return hevcBitratePercentageMultiplier;
|
||||
}
|
||||
|
||||
public int getAv1BitratePercentageMultiplier() {
|
||||
return av1BitratePercentageMultiplier;
|
||||
}
|
||||
|
||||
public int getAttachedGamepadMask() {
|
||||
return attachedGamepadMask;
|
||||
}
|
||||
@@ -244,10 +214,6 @@ public class StreamConfiguration {
|
||||
return clientRefreshRateX100;
|
||||
}
|
||||
|
||||
public int getEncryptionFlags() {
|
||||
return encryptionFlags;
|
||||
}
|
||||
|
||||
public int getColorRange() {
|
||||
return colorRange;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ public abstract class VideoDecoderRenderer {
|
||||
// for an IDR frame which contains several parameter sets and the I-frame data.
|
||||
public abstract int submitDecodeUnit(byte[] decodeUnitData, int decodeUnitLength, int decodeUnitType,
|
||||
int frameNumber, int frameType, char frameHostProcessingLatency,
|
||||
long receiveTimeMs, long enqueueTimeMs);
|
||||
long receiveTimeUs, long enqueueTimeUs);
|
||||
|
||||
public abstract void cleanup();
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package com.limelight.nvstream.http;
|
||||
|
||||
import java.security.PrivateKey;
|
||||
import java.security.cert.X509Certificate;
|
||||
import java.security.interfaces.RSAPrivateKey;
|
||||
|
||||
public interface LimelightCryptoProvider {
|
||||
X509Certificate getClientCertificate();
|
||||
RSAPrivateKey getClientPrivateKey();
|
||||
PrivateKey getClientPrivateKey();
|
||||
byte[] getPemEncodedClientCertificate();
|
||||
String encodeBase64String(byte[] data);
|
||||
}
|
||||
|
||||
@@ -50,6 +50,7 @@ import com.limelight.BuildConfig;
|
||||
import com.limelight.LimeLog;
|
||||
import com.limelight.nvstream.ConnectionContext;
|
||||
import com.limelight.nvstream.http.PairingManager.PairState;
|
||||
import com.limelight.nvstream.jni.MoonBridge;
|
||||
|
||||
import okhttp3.ConnectionPool;
|
||||
import okhttp3.HttpUrl;
|
||||
@@ -177,6 +178,7 @@ public class NvHTTP {
|
||||
.readTimeout(READ_TIMEOUT, TimeUnit.MILLISECONDS)
|
||||
.connectTimeout(LONG_CONNECTION_TIMEOUT, TimeUnit.MILLISECONDS)
|
||||
.proxy(Proxy.NO_PROXY)
|
||||
.fastFallback(false)
|
||||
.build();
|
||||
|
||||
httpClientShortConnectTimeout = httpClientLongConnectTimeout.newBuilder()
|
||||
@@ -402,16 +404,7 @@ public class NvHTTP {
|
||||
try {
|
||||
SSLContext sc = SSLContext.getInstance("TLS");
|
||||
sc.init(new KeyManager[] { keyManager }, new TrustManager[] { trustManager }, new SecureRandom());
|
||||
|
||||
// TLS 1.2 is not enabled by default prior to Android 5.0, so we'll need a custom
|
||||
// SSLSocketFactory in order to connect to GFE 3.20.4 which requires TLSv1.2 or later.
|
||||
// We don't just always use TLSv12SocketFactory because explicitly specifying TLS versions
|
||||
// prevents later TLS versions from being negotiated even if client and server otherwise
|
||||
// support them.
|
||||
return client.newBuilder().sslSocketFactory(
|
||||
Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP ?
|
||||
sc.getSocketFactory() : new TLSv12SocketFactory(sc),
|
||||
trustManager).build();
|
||||
return client.newBuilder().sslSocketFactory(sc.getSocketFactory(), trustManager).build();
|
||||
} catch (NoSuchAlgorithmException | KeyManagementException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
@@ -594,6 +587,12 @@ public class NvHTTP {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an app by ID
|
||||
* @param appId The ID of the app
|
||||
* @see #getAppByName(String) for alternative.
|
||||
* @return app details, or null if no app with that ID exists
|
||||
*/
|
||||
public NvApp getAppById(int appId) throws IOException, XmlPullParserException {
|
||||
LinkedList<NvApp> appList = getAppList();
|
||||
for (NvApp appFromList : appList) {
|
||||
@@ -603,11 +602,16 @@ public class NvHTTP {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/* NOTE: Only use this function if you know what you're doing.
|
||||
* It's totally valid to have two apps named the same thing,
|
||||
* or even nothing at all! Look apps up by ID if at all possible
|
||||
* using the above function */
|
||||
|
||||
/**
|
||||
* Get an app by name
|
||||
* NOTE: It is perfectly valid for multiple apps to have the same name,
|
||||
* this function will only return the first one it finds.
|
||||
* Consider using getAppById instead.
|
||||
* @param appName The name of the app
|
||||
* @see #getAppById(int) for alternative.
|
||||
* @return app details, or null if no app with that name exists
|
||||
*/
|
||||
public NvApp getAppByName(String appName) throws IOException, XmlPullParserException {
|
||||
LinkedList<NvApp> appList = getAppList();
|
||||
for (NvApp appFromList : appList) {
|
||||
@@ -784,7 +788,8 @@ public class NvHTTP {
|
||||
"&surroundAudioInfo=" + context.streamConfig.getAudioConfiguration().getSurroundAudioInfo() +
|
||||
"&remoteControllersBitmap=" + context.streamConfig.getAttachedGamepadMask() +
|
||||
"&gcmap=" + context.streamConfig.getAttachedGamepadMask() +
|
||||
"&gcpersist="+(context.streamConfig.getPersistGamepadsAfterDisconnect() ? 1 : 0));
|
||||
"&gcpersist="+(context.streamConfig.getPersistGamepadsAfterDisconnect() ? 1 : 0) +
|
||||
MoonBridge.getLaunchUrlQueryParameters());
|
||||
if ((verb.equals("launch") && !getXmlString(xmlStr, "gamesession", true).equals("0") ||
|
||||
(verb.equals("resume") && !getXmlString(xmlStr, "resume", true).equals("0")))) {
|
||||
// sessionUrl0 will be missing for older GFE versions
|
||||
@@ -812,62 +817,4 @@ public class NvHTTP {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Based on example code from https://blog.dev-area.net/2015/08/13/android-4-1-enable-tls-1-1-and-tls-1-2/
|
||||
private static class TLSv12SocketFactory extends SSLSocketFactory {
|
||||
private SSLSocketFactory internalSSLSocketFactory;
|
||||
|
||||
public TLSv12SocketFactory(SSLContext context) {
|
||||
internalSSLSocketFactory = context.getSocketFactory();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getDefaultCipherSuites() {
|
||||
return internalSSLSocketFactory.getDefaultCipherSuites();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getSupportedCipherSuites() {
|
||||
return internalSSLSocketFactory.getSupportedCipherSuites();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Socket createSocket() throws IOException {
|
||||
return enableTLSv12OnSocket(internalSSLSocketFactory.createSocket());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Socket createSocket(Socket s, String host, int port, boolean autoClose) throws IOException {
|
||||
return enableTLSv12OnSocket(internalSSLSocketFactory.createSocket(s, host, port, autoClose));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Socket createSocket(String host, int port) throws IOException {
|
||||
return enableTLSv12OnSocket(internalSSLSocketFactory.createSocket(host, port));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Socket createSocket(String host, int port, InetAddress localHost, int localPort) throws IOException {
|
||||
return enableTLSv12OnSocket(internalSSLSocketFactory.createSocket(host, port, localHost, localPort));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Socket createSocket(InetAddress host, int port) throws IOException {
|
||||
return enableTLSv12OnSocket(internalSSLSocketFactory.createSocket(host, port));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) throws IOException {
|
||||
return enableTLSv12OnSocket(internalSSLSocketFactory.createSocket(address, port, localAddress, localPort));
|
||||
}
|
||||
|
||||
private Socket enableTLSv12OnSocket(Socket socket) {
|
||||
if (socket instanceof SSLSocket) {
|
||||
// TLS 1.2 is not enabled by default prior to Android 5.0. We must enable it
|
||||
// explicitly to ensure we can communicate with GFE 3.20.4 which blocks TLS 1.0.
|
||||
((SSLSocket)socket).setEnabledProtocols(new String[] {"TLSv1.2"});
|
||||
}
|
||||
return socket;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,10 +98,21 @@ public class PairingManager {
|
||||
System.arraycopy(pin.getBytes("UTF-8"), 0, saltedPin, salt.length, pin.length());
|
||||
return saltedPin;
|
||||
}
|
||||
|
||||
private static Signature getSha256SignatureInstanceForKey(Key key) throws NoSuchAlgorithmException {
|
||||
switch (key.getAlgorithm()) {
|
||||
case "RSA":
|
||||
return Signature.getInstance("SHA256withRSA");
|
||||
case "EC":
|
||||
return Signature.getInstance("SHA256withECDSA");
|
||||
default:
|
||||
throw new NoSuchAlgorithmException("Unhandled key algorithm: " + key.getAlgorithm());
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean verifySignature(byte[] data, byte[] signature, Certificate cert) {
|
||||
try {
|
||||
Signature sig = Signature.getInstance("SHA256withRSA");
|
||||
Signature sig = PairingManager.getSha256SignatureInstanceForKey(cert.getPublicKey());
|
||||
sig.initVerify(cert.getPublicKey());
|
||||
sig.update(data);
|
||||
return sig.verify(signature);
|
||||
@@ -113,12 +124,10 @@ public class PairingManager {
|
||||
|
||||
private static byte[] signData(byte[] data, PrivateKey key) {
|
||||
try {
|
||||
Signature sig = Signature.getInstance("SHA256withRSA");
|
||||
Signature sig = PairingManager.getSha256SignatureInstanceForKey(key);
|
||||
sig.initSign(key);
|
||||
sig.update(data);
|
||||
byte[] signature = new byte[256];
|
||||
sig.sign(signature, 0, signature.length);
|
||||
return signature;
|
||||
return sig.sign();
|
||||
} catch (NoSuchAlgorithmException | SignatureException | InvalidKeyException e) {
|
||||
e.printStackTrace();
|
||||
throw new RuntimeException(e);
|
||||
@@ -245,7 +254,7 @@ public class PairingManager {
|
||||
// Get the server's signed secret
|
||||
byte[] serverSecretResp = hexToBytes(NvHTTP.getXmlString(secretResp, "pairingsecret", true));
|
||||
byte[] serverSecret = Arrays.copyOfRange(serverSecretResp, 0, 16);
|
||||
byte[] serverSignature = Arrays.copyOfRange(serverSecretResp, 16, 272);
|
||||
byte[] serverSignature = Arrays.copyOfRange(serverSecretResp, 16, serverSecretResp.length);
|
||||
|
||||
// Ensure the authenticity of the data
|
||||
if (!verifySignature(serverSecret, serverSignature, serverCert)) {
|
||||
|
||||
@@ -22,10 +22,6 @@ public class MoonBridge {
|
||||
public static final int VIDEO_FORMAT_MASK_AV1 = 0xF000;
|
||||
public static final int VIDEO_FORMAT_MASK_10BIT = 0x2200;
|
||||
|
||||
public static final int ENCFLG_NONE = 0;
|
||||
public static final int ENCFLG_AUDIO = 1;
|
||||
public static final int ENCFLG_ALL = 0xFFFFFFFF;
|
||||
|
||||
public static final int BUFFER_TYPE_PICDATA = 0;
|
||||
public static final int BUFFER_TYPE_SPS = 1;
|
||||
public static final int BUFFER_TYPE_PPS = 2;
|
||||
@@ -106,6 +102,7 @@ public class MoonBridge {
|
||||
public static final byte LI_CTYPE_XBOX = 0x01;
|
||||
public static final byte LI_CTYPE_PS = 0x02;
|
||||
public static final byte LI_CTYPE_NINTENDO = 0x03;
|
||||
public static final byte LI_CTYPE_STEAM = 0x04;
|
||||
|
||||
public static final short LI_CCAP_ANALOG_TRIGGERS = 0x01;
|
||||
public static final short LI_CCAP_RUMBLE = 0x02;
|
||||
@@ -115,6 +112,7 @@ public class MoonBridge {
|
||||
public static final short LI_CCAP_GYRO = 0x20;
|
||||
public static final short LI_CCAP_BATTERY_STATE = 0x40;
|
||||
public static final short LI_CCAP_RGB_LED = 0x80;
|
||||
public static final short LI_CCAP_DUAL_TOUCHPAD = 0x100;
|
||||
|
||||
public static final byte LI_MOTION_TYPE_ACCEL = 0x01;
|
||||
public static final byte LI_MOTION_TYPE_GYRO = 0x02;
|
||||
@@ -221,10 +219,10 @@ public class MoonBridge {
|
||||
|
||||
public static int bridgeDrSubmitDecodeUnit(byte[] decodeUnitData, int decodeUnitLength, int decodeUnitType,
|
||||
int frameNumber, int frameType, char frameHostProcessingLatency,
|
||||
long receiveTimeMs, long enqueueTimeMs) {
|
||||
long receiveTimeUs, long enqueueTimeUs) {
|
||||
if (videoRenderer != null) {
|
||||
return videoRenderer.submitDecodeUnit(decodeUnitData, decodeUnitLength,
|
||||
decodeUnitType, frameNumber, frameType, frameHostProcessingLatency, receiveTimeMs, enqueueTimeMs);
|
||||
decodeUnitType, frameNumber, frameType, frameHostProcessingLatency, receiveTimeUs, enqueueTimeUs);
|
||||
}
|
||||
else {
|
||||
return DR_OK;
|
||||
@@ -347,10 +345,7 @@ public class MoonBridge {
|
||||
int width, int height, int fps,
|
||||
int bitrate, int packetSize, int streamingRemotely,
|
||||
int audioConfiguration, int supportedVideoFormats,
|
||||
int hevcBitratePercentageMultiplier,
|
||||
int av1BitratePercentageMultiplier,
|
||||
int clientRefreshRateX100,
|
||||
int encryptionFlags,
|
||||
byte[] riAesKey, byte[] riAesIv,
|
||||
int videoCapabilities,
|
||||
int colorSpace, int colorRange);
|
||||
@@ -415,6 +410,8 @@ public class MoonBridge {
|
||||
// The RTT is in the top 32 bits, and the RTT variance is in the bottom 32 bits
|
||||
public static native long getEstimatedRttInfo();
|
||||
|
||||
public static native String getLaunchUrlQueryParameters();
|
||||
|
||||
public static native byte guessControllerType(int vendorId, int productId);
|
||||
|
||||
public static native boolean guessControllerHasPaddles(int vendorId, int productId);
|
||||
|
||||
@@ -13,7 +13,6 @@ import com.limelight.R;
|
||||
import static com.limelight.binding.input.virtual_controller.VirtualControllerConfigurationLoader.OSC_PREFERENCE;
|
||||
|
||||
public class ConfirmDeleteOscPreference extends DialogPreference {
|
||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
public ConfirmDeleteOscPreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
|
||||
super(context, attrs, defStyleAttr, defStyleRes);
|
||||
}
|
||||
@@ -26,7 +25,6 @@ public class ConfirmDeleteOscPreference extends DialogPreference {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
public ConfirmDeleteOscPreference(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@@ -11,12 +11,10 @@ import android.provider.Settings;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
public class LanguagePreference extends ListPreference {
|
||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
public LanguagePreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
|
||||
super(context, attrs, defStyleAttr, defStyleRes);
|
||||
}
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
public LanguagePreference(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
@@ -17,6 +17,12 @@ public class PreferenceConfiguration {
|
||||
FORCE_H264,
|
||||
};
|
||||
|
||||
public enum AnalogStickForScrolling {
|
||||
NONE,
|
||||
RIGHT,
|
||||
LEFT
|
||||
}
|
||||
|
||||
private static final String LEGACY_RES_FPS_PREF_STRING = "list_resolution_fps";
|
||||
private static final String LEGACY_ENABLE_51_SURROUND_PREF_STRING = "checkbox_51_surround";
|
||||
|
||||
@@ -38,16 +44,19 @@ public class PreferenceConfiguration {
|
||||
private static final String VIDEO_FORMAT_PREF_STRING = "video_format";
|
||||
private static final String ONSCREEN_CONTROLLER_PREF_STRING = "checkbox_show_onscreen_controls";
|
||||
private static final String ONLY_L3_R3_PREF_STRING = "checkbox_only_show_L3R3";
|
||||
private static final String SHOW_GUIDE_BUTTON_PREF_STRING = "checkbox_show_guide_button";
|
||||
private static final String LEGACY_DISABLE_FRAME_DROP_PREF_STRING = "checkbox_disable_frame_drop";
|
||||
private static final String ENABLE_HDR_PREF_STRING = "checkbox_enable_hdr";
|
||||
private static final String ENABLE_PIP_PREF_STRING = "checkbox_enable_pip";
|
||||
private static final String ENABLE_PERF_OVERLAY_STRING = "checkbox_enable_perf_overlay";
|
||||
private static final String BIND_ALL_USB_STRING = "checkbox_usb_bind_all";
|
||||
private static final String MOUSE_EMULATION_STRING = "checkbox_mouse_emulation";
|
||||
private static final String ANALOG_SCROLLING_PREF_STRING = "analog_scrolling";
|
||||
private static final String MOUSE_NAV_BUTTONS_STRING = "checkbox_mouse_nav_buttons";
|
||||
static final String UNLOCK_FPS_STRING = "checkbox_unlock_fps";
|
||||
private static final String VIBRATE_OSC_PREF_STRING = "checkbox_vibrate_osc";
|
||||
private static final String VIBRATE_FALLBACK_PREF_STRING = "checkbox_vibrate_fallback";
|
||||
private static final String VIBRATE_FALLBACK_STRENGTH_PREF_STRING = "seekbar_vibrate_fallback_strength";
|
||||
private static final String FLIP_FACE_BUTTONS_PREF_STRING = "checkbox_flip_face_buttons";
|
||||
private static final String TOUCHSCREEN_TRACKPAD_PREF_STRING = "checkbox_touchscreen_trackpad";
|
||||
private static final String LATENCY_TOAST_PREF_STRING = "checkbox_enable_post_stream_toast";
|
||||
@@ -75,15 +84,18 @@ public class PreferenceConfiguration {
|
||||
|
||||
private static final boolean ONSCREEN_CONTROLLER_DEFAULT = false;
|
||||
private static final boolean ONLY_L3_R3_DEFAULT = false;
|
||||
private static final boolean SHOW_GUIDE_BUTTON_DEFAULT = true;
|
||||
private static final boolean DEFAULT_ENABLE_HDR = false;
|
||||
private static final boolean DEFAULT_ENABLE_PIP = false;
|
||||
private static final boolean DEFAULT_ENABLE_PERF_OVERLAY = false;
|
||||
private static final boolean DEFAULT_BIND_ALL_USB = false;
|
||||
private static final boolean DEFAULT_MOUSE_EMULATION = true;
|
||||
private static final String DEFAULT_ANALOG_STICK_FOR_SCROLLING = "right";
|
||||
private static final boolean DEFAULT_MOUSE_NAV_BUTTONS = false;
|
||||
private static final boolean DEFAULT_UNLOCK_FPS = false;
|
||||
private static final boolean DEFAULT_VIBRATE_OSC = true;
|
||||
private static final boolean DEFAULT_VIBRATE_FALLBACK = false;
|
||||
private static final int DEFAULT_VIBRATE_FALLBACK_STRENGTH = 100;
|
||||
private static final boolean DEFAULT_FLIP_FACE_BUTTONS = false;
|
||||
private static final boolean DEFAULT_TOUCHSCREEN_TRACKPAD = true;
|
||||
private static final String DEFAULT_AUDIO_CONFIG = "2"; // Stereo
|
||||
@@ -120,16 +132,19 @@ public class PreferenceConfiguration {
|
||||
public boolean smallIconMode, multiController, usbDriver, flipFaceButtons;
|
||||
public boolean onscreenController;
|
||||
public boolean onlyL3R3;
|
||||
public boolean showGuideButton;
|
||||
public boolean enableHdr;
|
||||
public boolean enablePip;
|
||||
public boolean enablePerfOverlay;
|
||||
public boolean enableLatencyToast;
|
||||
public boolean bindAllUsb;
|
||||
public boolean mouseEmulation;
|
||||
public AnalogStickForScrolling analogStickForScrolling;
|
||||
public boolean mouseNavButtons;
|
||||
public boolean unlockFps;
|
||||
public boolean vibrateOsc;
|
||||
public boolean vibrateFallbackToDevice;
|
||||
public int vibrateFallbackToDeviceStrength;
|
||||
public boolean touchscreenTrackpad;
|
||||
public MoonBridge.AudioConfiguration audioConfiguration;
|
||||
public int framePacing;
|
||||
@@ -384,6 +399,21 @@ public class PreferenceConfiguration {
|
||||
}
|
||||
}
|
||||
|
||||
private static AnalogStickForScrolling getAnalogStickForScrollingValue(Context context) {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
|
||||
String str = prefs.getString(ANALOG_SCROLLING_PREF_STRING, DEFAULT_ANALOG_STICK_FOR_SCROLLING);
|
||||
if (str.equals("right")) {
|
||||
return AnalogStickForScrolling.RIGHT;
|
||||
}
|
||||
else if (str.equals("left")) {
|
||||
return AnalogStickForScrolling.LEFT;
|
||||
}
|
||||
else {
|
||||
return AnalogStickForScrolling.NONE;
|
||||
}
|
||||
}
|
||||
|
||||
public static void resetStreamingSettings(Context context) {
|
||||
// We consider resolution, FPS, bitrate, HDR, and video format as "streaming settings" here
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
@@ -532,6 +562,8 @@ public class PreferenceConfiguration {
|
||||
config.videoFormat = getVideoFormatValue(context);
|
||||
config.framePacing = getFramePacingValue(context);
|
||||
|
||||
config.analogStickForScrolling = getAnalogStickForScrollingValue(context);
|
||||
|
||||
config.deadzonePercentage = prefs.getInt(DEADZONE_PREF_STRING, DEFAULT_DEADZONE);
|
||||
|
||||
config.oscOpacity = prefs.getInt(OSC_OPACITY_PREF_STRING, DEFAULT_OPACITY);
|
||||
@@ -548,6 +580,7 @@ public class PreferenceConfiguration {
|
||||
config.usbDriver = prefs.getBoolean(USB_DRIVER_PREF_SRING, DEFAULT_USB_DRIVER);
|
||||
config.onscreenController = prefs.getBoolean(ONSCREEN_CONTROLLER_PREF_STRING, ONSCREEN_CONTROLLER_DEFAULT);
|
||||
config.onlyL3R3 = prefs.getBoolean(ONLY_L3_R3_PREF_STRING, ONLY_L3_R3_DEFAULT);
|
||||
config.showGuideButton = prefs.getBoolean(SHOW_GUIDE_BUTTON_PREF_STRING, SHOW_GUIDE_BUTTON_DEFAULT);
|
||||
config.enableHdr = prefs.getBoolean(ENABLE_HDR_PREF_STRING, DEFAULT_ENABLE_HDR) && !isShieldAtvFirmwareWithBrokenHdr();
|
||||
config.enablePip = prefs.getBoolean(ENABLE_PIP_PREF_STRING, DEFAULT_ENABLE_PIP);
|
||||
config.enablePerfOverlay = prefs.getBoolean(ENABLE_PERF_OVERLAY_STRING, DEFAULT_ENABLE_PERF_OVERLAY);
|
||||
@@ -557,6 +590,7 @@ public class PreferenceConfiguration {
|
||||
config.unlockFps = prefs.getBoolean(UNLOCK_FPS_STRING, DEFAULT_UNLOCK_FPS);
|
||||
config.vibrateOsc = prefs.getBoolean(VIBRATE_OSC_PREF_STRING, DEFAULT_VIBRATE_OSC);
|
||||
config.vibrateFallbackToDevice = prefs.getBoolean(VIBRATE_FALLBACK_PREF_STRING, DEFAULT_VIBRATE_FALLBACK);
|
||||
config.vibrateFallbackToDeviceStrength = prefs.getInt(VIBRATE_FALLBACK_STRENGTH_PREF_STRING, DEFAULT_VIBRATE_FALLBACK_STRENGTH);
|
||||
config.flipFaceButtons = prefs.getBoolean(FLIP_FACE_BUTTONS_PREF_STRING, DEFAULT_FLIP_FACE_BUTTONS);
|
||||
config.touchscreenTrackpad = prefs.getBoolean(TOUCHSCREEN_TRACKPAD_PREF_STRING, DEFAULT_TOUCHSCREEN_TRACKPAD);
|
||||
config.enableLatencyToast = prefs.getBoolean(LATENCY_TOAST_PREF_STRING, DEFAULT_LATENCY_TOAST);
|
||||
|
||||
@@ -190,8 +190,13 @@ public class StreamSettings extends Activity {
|
||||
}
|
||||
|
||||
private void addNativeFrameRateEntry(float framerate) {
|
||||
int frameRateRounded = Math.round(framerate);
|
||||
if (frameRateRounded == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
ListPreference pref = (ListPreference) findPreference(PreferenceConfiguration.FPS_PREF_STRING);
|
||||
String fpsValue = Integer.toString(Math.round(framerate));
|
||||
String fpsValue = Integer.toString(frameRateRounded);
|
||||
String fpsName = getResources().getString(R.string.resolution_prefix_native) +
|
||||
" (" + fpsValue + " " + getResources().getString(R.string.fps_suffix_fps) + ")";
|
||||
|
||||
@@ -328,26 +333,29 @@ public class StreamSettings extends Activity {
|
||||
(PreferenceCategory) findPreference("category_help");
|
||||
screen.removePreference(category);
|
||||
}*/
|
||||
|
||||
PreferenceCategory category_gamepad_settings =
|
||||
(PreferenceCategory) findPreference("category_gamepad_settings");
|
||||
// Remove the vibration options if the device can't vibrate
|
||||
if (!((Vibrator)getActivity().getSystemService(Context.VIBRATOR_SERVICE)).hasVibrator()) {
|
||||
PreferenceCategory category =
|
||||
(PreferenceCategory) findPreference("category_gamepad_settings");
|
||||
category.removePreference(findPreference("checkbox_vibrate_fallback"));
|
||||
|
||||
category_gamepad_settings.removePreference(findPreference("checkbox_vibrate_fallback"));
|
||||
category_gamepad_settings.removePreference(findPreference("seekbar_vibrate_fallback_strength"));
|
||||
// The entire OSC category may have already been removed by the touchscreen check above
|
||||
category = (PreferenceCategory) findPreference("category_onscreen_controls");
|
||||
PreferenceCategory category = (PreferenceCategory) findPreference("category_onscreen_controls");
|
||||
if (category != null) {
|
||||
category.removePreference(findPreference("checkbox_vibrate_osc"));
|
||||
}
|
||||
}
|
||||
else if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O ||
|
||||
!((Vibrator)getActivity().getSystemService(Context.VIBRATOR_SERVICE)).hasAmplitudeControl() ) {
|
||||
// Remove the vibration strength selector of the device doesn't have amplitude control
|
||||
category_gamepad_settings.removePreference(findPreference("seekbar_vibrate_fallback_strength"));
|
||||
}
|
||||
|
||||
int maxSupportedFps = 0;
|
||||
Display display = getActivity().getWindowManager().getDefaultDisplay();
|
||||
float maxSupportedFps = display.getRefreshRate();
|
||||
|
||||
// Hide non-supported resolution/FPS combinations
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
Display display = getActivity().getWindowManager().getDefaultDisplay();
|
||||
|
||||
int maxSupportedResW = 0;
|
||||
|
||||
// Add a native resolution with any insets included for users that don't want content
|
||||
@@ -415,7 +423,7 @@ public class StreamSettings extends Activity {
|
||||
}
|
||||
|
||||
if (candidate.getRefreshRate() > maxSupportedFps) {
|
||||
maxSupportedFps = (int)candidate.getRefreshRate();
|
||||
maxSupportedFps = candidate.getRefreshRate();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -503,30 +511,15 @@ public class StreamSettings extends Activity {
|
||||
// Never remove 720p
|
||||
}
|
||||
}
|
||||
else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
|
||||
// On Android 4.2 and later, we can get the true metrics via the
|
||||
// getRealMetrics() function (unlike the lies that getWidth() and getHeight()
|
||||
// tell to us).
|
||||
else {
|
||||
// We can get the true metrics via the getRealMetrics() function (unlike the lies
|
||||
// that getWidth() and getHeight() tell to us).
|
||||
DisplayMetrics metrics = new DisplayMetrics();
|
||||
getActivity().getWindowManager().getDefaultDisplay().getRealMetrics(metrics);
|
||||
display.getRealMetrics(metrics);
|
||||
int width = Math.max(metrics.widthPixels, metrics.heightPixels);
|
||||
int height = Math.min(metrics.widthPixels, metrics.heightPixels);
|
||||
addNativeResolutionEntries(width, height, false);
|
||||
}
|
||||
else {
|
||||
// On Android 4.1, we have to resort to reflection to invoke hidden APIs
|
||||
// to get the real screen dimensions.
|
||||
Display display = getActivity().getWindowManager().getDefaultDisplay();
|
||||
try {
|
||||
Method getRawHeightFunc = Display.class.getMethod("getRawHeight");
|
||||
Method getRawWidthFunc = Display.class.getMethod("getRawWidth");
|
||||
int width = (Integer) getRawWidthFunc.invoke(display);
|
||||
int height = (Integer) getRawHeightFunc.invoke(display);
|
||||
addNativeResolutionEntries(Math.max(width, height), Math.min(width, height), false);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
if (!PreferenceConfiguration.readPreferences(this.getActivity()).unlockFps) {
|
||||
// We give some extra room in case the FPS is rounded down
|
||||
@@ -555,49 +548,29 @@ public class StreamSettings extends Activity {
|
||||
}
|
||||
addNativeFrameRateEntry(maxSupportedFps);
|
||||
|
||||
// Android L introduces proper 7.1 surround sound support. Remove the 7.1 option
|
||||
// for earlier versions of Android to prevent AudioTrack initialization issues.
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
|
||||
LimeLog.info("Excluding 7.1 surround sound option based on OS");
|
||||
removeValue(PreferenceConfiguration.AUDIO_CONFIG_PREF_STRING, "71", new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
setValue(PreferenceConfiguration.AUDIO_CONFIG_PREF_STRING, "51");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Android L introduces the drop duplicate behavior of releaseOutputBuffer()
|
||||
// that the unlock FPS option relies on to not massively increase latency.
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
|
||||
LimeLog.info("Excluding unlock FPS toggle based on OS");
|
||||
PreferenceCategory category =
|
||||
(PreferenceCategory) findPreference("category_advanced_settings");
|
||||
category.removePreference(findPreference("checkbox_unlock_fps"));
|
||||
}
|
||||
else {
|
||||
findPreference(PreferenceConfiguration.UNLOCK_FPS_STRING).setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
|
||||
@Override
|
||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
// HACK: We need to let the preference change succeed before reinitializing to ensure
|
||||
// it's reflected in the new layout.
|
||||
final Handler h = new Handler();
|
||||
h.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
// Ensure the activity is still open when this timeout expires
|
||||
StreamSettings settingsActivity = (StreamSettings)SettingsFragment.this.getActivity();
|
||||
if (settingsActivity != null) {
|
||||
settingsActivity.reloadSettings();
|
||||
}
|
||||
findPreference(PreferenceConfiguration.UNLOCK_FPS_STRING).setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
|
||||
@Override
|
||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
// HACK: We need to let the preference change succeed before reinitializing to ensure
|
||||
// it's reflected in the new layout.
|
||||
final Handler h = new Handler();
|
||||
h.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
// Ensure the activity is still open when this timeout expires
|
||||
StreamSettings settingsActivity = (StreamSettings) SettingsFragment.this.getActivity();
|
||||
if (settingsActivity != null) {
|
||||
settingsActivity.reloadSettings();
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
}, 500);
|
||||
|
||||
// Allow the original preference change to take place
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
// Allow the original preference change to take place
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
// Remove HDR preference for devices below Nougat
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) {
|
||||
@@ -607,7 +580,6 @@ public class StreamSettings extends Activity {
|
||||
category.removePreference(findPreference("checkbox_enable_hdr"));
|
||||
}
|
||||
else {
|
||||
Display display = getActivity().getWindowManager().getDefaultDisplay();
|
||||
Display.HdrCapabilities hdrCaps = display.getHdrCapabilities();
|
||||
|
||||
// We must now ensure our display is compatible with HDR10
|
||||
@@ -617,6 +589,7 @@ public class StreamSettings extends Activity {
|
||||
for (int hdrType : hdrCaps.getSupportedHdrTypes()) {
|
||||
if (hdrType == Display.HdrCapabilities.HDR_TYPE_HDR10) {
|
||||
foundHdr10 = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@ public class WebLauncherPreference extends Preference {
|
||||
initialize(attrs);
|
||||
}
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
public WebLauncherPreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
|
||||
super(context, attrs, defStyleAttr, defStyleRes);
|
||||
initialize(attrs);
|
||||
|
||||
@@ -30,6 +30,6 @@ public class AdapterFragment extends Fragment {
|
||||
@Override
|
||||
public void onActivityCreated(Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
callbacks.receiveAbsListView((AbsListView) getView().findViewById(R.id.fragmentView));
|
||||
callbacks.receiveAbsListView(getView().findViewById(R.id.fragmentView));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,6 @@ public class StreamView extends SurfaceView {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
@TargetApi(21)
|
||||
public StreamView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
|
||||
super(context, attrs, defStyleAttr, defStyleRes);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ public class NetHelper {
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
else {
|
||||
NetworkInfo activeNetworkInfo = connMgr.getActiveNetworkInfo();
|
||||
if (activeNetworkInfo != null) {
|
||||
return activeNetworkInfo.getType() == ConnectivityManager.TYPE_VPN;
|
||||
|
||||
@@ -2,15 +2,12 @@ package com.limelight.utils;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ShortcutInfo;
|
||||
import android.content.pm.ShortcutManager;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.drawable.Icon;
|
||||
import android.os.Build;
|
||||
|
||||
import com.limelight.AppView;
|
||||
import com.limelight.ShortcutTrampoline;
|
||||
import com.limelight.R;
|
||||
import com.limelight.nvstream.http.ComputerDetails;
|
||||
import com.limelight.nvstream.http.NvApp;
|
||||
|
||||
@@ -53,7 +53,11 @@ public class TvChannelHelper {
|
||||
intent.putExtra(TvContract.EXTRA_CHANNEL_ID, getChannelId(computer.uuid));
|
||||
try {
|
||||
context.startActivityForResult(intent, 0);
|
||||
} catch (ActivityNotFoundException e) {
|
||||
} catch (Exception ignored) {
|
||||
// ActivityNotFoundException is the only officially documented
|
||||
// exception that can result from this call. However some buggy
|
||||
// devices throw others.
|
||||
// See https://github.com/moonlight-stream/moonlight-android/issues/1302
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,13 +31,19 @@ public class UiHelper {
|
||||
|
||||
private static void setGameModeStatus(Context context, boolean streaming, boolean interruptible) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||
GameManager gameManager = context.getSystemService(GameManager.class);
|
||||
try {
|
||||
GameManager gameManager = context.getSystemService(GameManager.class);
|
||||
if (gameManager == null) {
|
||||
return; // Not supported on this device (e.g., Meta Quest)
|
||||
}
|
||||
|
||||
if (streaming) {
|
||||
gameManager.setGameState(new GameState(false, interruptible ? GameState.MODE_GAMEPLAY_INTERRUPTIBLE : GameState.MODE_GAMEPLAY_UNINTERRUPTIBLE));
|
||||
}
|
||||
else {
|
||||
gameManager.setGameState(new GameState(false, GameState.MODE_NONE));
|
||||
if (streaming) {
|
||||
gameManager.setGameState(new GameState(false, interruptible ? GameState.MODE_GAMEPLAY_INTERRUPTIBLE : GameState.MODE_GAMEPLAY_UNINTERRUPTIBLE));
|
||||
} else {
|
||||
gameManager.setGameState(new GameState(false, GameState.MODE_NONE));
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
// Swallow any failure. Some OEM builds ship partial/incompatible GameManager impls.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
# Application.mk for Moonlight
|
||||
|
||||
# Our minimum version is Android 4.1
|
||||
APP_PLATFORM := android-16
|
||||
# Our minimum version is Android 5.0
|
||||
APP_PLATFORM := android-21
|
||||
|
||||
# We support 16KB pages
|
||||
APP_SUPPORT_FLEXIBLE_PAGE_SIZES := true
|
||||
|
||||
@@ -28,7 +28,9 @@ LOCAL_SRC_FILES := moonlight-common-c/src/AudioStream.c \
|
||||
moonlight-common-c/src/SimpleStun.c \
|
||||
moonlight-common-c/src/VideoDepacketizer.c \
|
||||
moonlight-common-c/src/VideoStream.c \
|
||||
moonlight-common-c/reedsolomon/rs.c \
|
||||
moonlight-common-c/nanors/deps/obl/oblas_common.c \
|
||||
moonlight-common-c/nanors/deps/obl/oblas_lite.c \
|
||||
moonlight-common-c/nanors/rs.c \
|
||||
moonlight-common-c/enet/callbacks.c \
|
||||
moonlight-common-c/enet/compress.c \
|
||||
moonlight-common-c/enet/host.c \
|
||||
@@ -44,7 +46,8 @@ LOCAL_SRC_FILES := moonlight-common-c/src/AudioStream.c \
|
||||
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/moonlight-common-c/enet/include \
|
||||
$(LOCAL_PATH)/moonlight-common-c/reedsolomon \
|
||||
$(LOCAL_PATH)/moonlight-common-c/nanors/deps/obl \
|
||||
$(LOCAL_PATH)/moonlight-common-c/nanors \
|
||||
$(LOCAL_PATH)/moonlight-common-c/src \
|
||||
|
||||
LOCAL_CFLAGS := -DHAS_SOCKLEN_T=1 -DLC_ANDROID -DHAVE_CLOCK_GETTIME=1
|
||||
@@ -55,7 +58,11 @@ endif
|
||||
|
||||
LOCAL_LDLIBS := -llog
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := libopus libssl libcrypto
|
||||
LOCAL_STATIC_LIBRARIES := libopus libcrypto cpufeatures
|
||||
LOCAL_LDFLAGS += -Wl,--exclude-libs,ALL
|
||||
|
||||
LOCAL_BRANCH_PROTECTION := standard
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
$(call import-module,android/cpufeatures)
|
||||
@@ -0,0 +1 @@
|
||||
Static libraries were built from https://github.com/cgutman/moonlight-mobile-deps using AppVeyor CI
|
||||
@@ -8,6 +8,8 @@
|
||||
#include <opus_multistream.h>
|
||||
#include <android/log.h>
|
||||
|
||||
#include <cpu-features.h>
|
||||
|
||||
static OpusMSDecoder* Decoder;
|
||||
static OPUS_MULTISTREAM_CONFIGURATION OpusConfig;
|
||||
|
||||
@@ -166,7 +168,7 @@ int BridgeDrSubmitDecodeUnit(PDECODE_UNIT decodeUnit) {
|
||||
ret = (*env)->CallStaticIntMethod(env, GlobalBridgeClass, BridgeDrSubmitDecodeUnitMethod,
|
||||
DecodedFrameBuffer, currentEntry->length, currentEntry->bufferType,
|
||||
decodeUnit->frameNumber, decodeUnit->frameType, (jchar)decodeUnit->frameHostProcessingLatency,
|
||||
(jlong)decodeUnit->receiveTimeMs, (jlong)decodeUnit->enqueueTimeMs);
|
||||
(jlong)decodeUnit->receiveTimeUs, (jlong)decodeUnit->enqueueTimeUs);
|
||||
if ((*env)->ExceptionCheck(env)) {
|
||||
// We will crash here
|
||||
(*JVM)->DetachCurrentThread(JVM);
|
||||
@@ -187,7 +189,7 @@ int BridgeDrSubmitDecodeUnit(PDECODE_UNIT decodeUnit) {
|
||||
ret = (*env)->CallStaticIntMethod(env, GlobalBridgeClass, BridgeDrSubmitDecodeUnitMethod,
|
||||
DecodedFrameBuffer, offset, BUFFER_TYPE_PICDATA,
|
||||
decodeUnit->frameNumber, decodeUnit->frameType, (jchar)decodeUnit->frameHostProcessingLatency,
|
||||
(jlong)decodeUnit->receiveTimeMs, (jlong)decodeUnit->enqueueTimeMs);
|
||||
(jlong)decodeUnit->receiveTimeUs, (jlong)decodeUnit->enqueueTimeUs);
|
||||
if ((*env)->ExceptionCheck(env)) {
|
||||
// We will crash here
|
||||
(*JVM)->DetachCurrentThread(JVM);
|
||||
@@ -426,6 +428,29 @@ static CONNECTION_LISTENER_CALLBACKS BridgeConnListenerCallbacks = {
|
||||
.setControllerLED = BridgeClSetControllerLED,
|
||||
};
|
||||
|
||||
static bool
|
||||
hasFastAes() {
|
||||
if (android_getCpuCount() <= 2) {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (android_getCpuFamily()) {
|
||||
case ANDROID_CPU_FAMILY_ARM:
|
||||
return !!(android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_AES);
|
||||
case ANDROID_CPU_FAMILY_ARM64:
|
||||
return !!(android_getCpuFeatures() & ANDROID_CPU_ARM64_FEATURE_AES);
|
||||
case ANDROID_CPU_FAMILY_X86:
|
||||
case ANDROID_CPU_FAMILY_X86_64:
|
||||
return !!(android_getCpuFeatures() & ANDROID_CPU_X86_FEATURE_AES_NI);
|
||||
case ANDROID_CPU_FAMILY_MIPS:
|
||||
case ANDROID_CPU_FAMILY_MIPS64:
|
||||
return false;
|
||||
default:
|
||||
// Assume new architectures will all have crypto acceleration (RISC-V will)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
JNIEXPORT jint JNICALL
|
||||
Java_com_limelight_nvstream_jni_MoonBridge_startConnection(JNIEnv *env, jclass clazz,
|
||||
jstring address, jstring appVersion, jstring gfeVersion,
|
||||
@@ -433,10 +458,7 @@ Java_com_limelight_nvstream_jni_MoonBridge_startConnection(JNIEnv *env, jclass c
|
||||
jint width, jint height, jint fps,
|
||||
jint bitrate, jint packetSize, jint streamingRemotely,
|
||||
jint audioConfiguration, jint supportedVideoFormats,
|
||||
jint hevcBitratePercentageMultiplier,
|
||||
jint av1BitratePercentageMultiplier,
|
||||
jint clientRefreshRateX100,
|
||||
jint encryptionFlags,
|
||||
jbyteArray riAesKey, jbyteArray riAesIv,
|
||||
jint videoCapabilities,
|
||||
jint colorSpace, jint colorRange) {
|
||||
@@ -456,10 +478,8 @@ Java_com_limelight_nvstream_jni_MoonBridge_startConnection(JNIEnv *env, jclass c
|
||||
.streamingRemotely = streamingRemotely,
|
||||
.audioConfiguration = audioConfiguration,
|
||||
.supportedVideoFormats = supportedVideoFormats,
|
||||
.hevcBitratePercentageMultiplier = hevcBitratePercentageMultiplier,
|
||||
.av1BitratePercentageMultiplier = av1BitratePercentageMultiplier,
|
||||
.clientRefreshRateX100 = clientRefreshRateX100,
|
||||
.encryptionFlags = encryptionFlags,
|
||||
.encryptionFlags = ENCFLG_AUDIO,
|
||||
.colorSpace = colorSpace,
|
||||
.colorRange = colorRange
|
||||
};
|
||||
@@ -474,6 +494,11 @@ Java_com_limelight_nvstream_jni_MoonBridge_startConnection(JNIEnv *env, jclass c
|
||||
|
||||
BridgeVideoRendererCallbacks.capabilities = videoCapabilities;
|
||||
|
||||
// Enable all encryption features if the platform has fast AES support
|
||||
if (hasFastAes()) {
|
||||
streamConfig.encryptionFlags = ENCFLG_ALL;
|
||||
}
|
||||
|
||||
int ret = LiStartConnection(&serverInfo,
|
||||
&streamConfig,
|
||||
&BridgeConnListenerCallbacks,
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
|
||||
static const ControllerDescription_t arrControllers[] = {
|
||||
{ MAKE_CONTROLLER_ID( 0x0079, 0x181a ), k_eControllerType_PS3Controller, NULL }, // Venom Arcade Stick
|
||||
{ MAKE_CONTROLLER_ID( 0x0079, 0x1844 ), k_eControllerType_PS3Controller, NULL }, // From SDL
|
||||
{ MAKE_CONTROLLER_ID( 0x044f, 0xb315 ), k_eControllerType_PS3Controller, NULL }, // Firestorm Dual Analog 3
|
||||
{ MAKE_CONTROLLER_ID( 0x044f, 0xd007 ), k_eControllerType_PS3Controller, NULL }, // Thrustmaster wireless 3-1
|
||||
{ MAKE_CONTROLLER_ID( 0x046d, 0xcad1 ), k_eControllerType_PS3Controller, NULL }, // Logitech Chillstream
|
||||
//{ MAKE_CONTROLLER_ID( 0x046d, 0xc24f ), k_eControllerType_PS3Controller, NULL }, // Logitech G29 (PS3)
|
||||
{ MAKE_CONTROLLER_ID( 0x054c, 0x0268 ), k_eControllerType_PS3Controller, NULL }, // Sony PS3 Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x056e, 0x200f ), k_eControllerType_PS3Controller, NULL }, // From SDL
|
||||
@@ -60,15 +60,39 @@ static const ControllerDescription_t arrControllers[] = {
|
||||
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x0088 ), k_eControllerType_PS3Controller, NULL }, // HORI Fighting Stick mini 4
|
||||
{ MAKE_CONTROLLER_ID( 0x0f30, 0x1100 ), k_eControllerType_PS3Controller, NULL }, // Qanba Q1 fight stick
|
||||
{ MAKE_CONTROLLER_ID( 0x11ff, 0x3331 ), k_eControllerType_PS3Controller, NULL }, // SRXJ-PH2400
|
||||
{ MAKE_CONTROLLER_ID( 0x12ba, 0x0100 ), k_eControllerType_PS3Controller, NULL }, // PS3 Guitar Hero Guitar
|
||||
{ MAKE_CONTROLLER_ID( 0x12ba, 0x0120 ), k_eControllerType_PS3Controller, NULL }, // PS3 Guitar Hero Drums
|
||||
{ MAKE_CONTROLLER_ID( 0x12ba, 0x0140 ), k_eControllerType_PS3Controller, NULL }, // PS3 DJ Hero Turntable
|
||||
{ MAKE_CONTROLLER_ID( 0x12ba, 0x0200 ), k_eControllerType_PS3Controller, NULL }, // PS3 Rock Band Guitar
|
||||
{ MAKE_CONTROLLER_ID( 0x12ba, 0x0210 ), k_eControllerType_PS3Controller, NULL }, // PS3 Rock Band Drums
|
||||
{ MAKE_CONTROLLER_ID( 0x12ba, 0x0218 ), k_eControllerType_PS3Controller, NULL }, // PS3 Midi Pro Adapter - Drums Mode
|
||||
{ MAKE_CONTROLLER_ID( 0x12ba, 0x074b ), k_eControllerType_PS3Controller, NULL }, // PS3 / Wii U Guitar Hero Live Guitar
|
||||
{ MAKE_CONTROLLER_ID( 0x12ba, 0x2330 ), k_eControllerType_PS3Controller, NULL }, // PS3 Rock Band Keyboard
|
||||
{ MAKE_CONTROLLER_ID( 0x12ba, 0x2338 ), k_eControllerType_PS3Controller, NULL }, // PS3 Midi Pro Adapter - Keyboard Mode
|
||||
{ MAKE_CONTROLLER_ID( 0x12ba, 0x2430 ), k_eControllerType_PS3Controller, NULL }, // PS3 Mustang Guitar
|
||||
{ MAKE_CONTROLLER_ID( 0x12ba, 0x2438 ), k_eControllerType_PS3Controller, NULL }, // PS3 Midi Pro Adapter - Mustang Guitar Mode
|
||||
{ MAKE_CONTROLLER_ID( 0x12ba, 0x2530 ), k_eControllerType_PS3Controller, NULL }, // PS3 Squire Guitar
|
||||
{ MAKE_CONTROLLER_ID( 0x12ba, 0x2538 ), k_eControllerType_PS3Controller, NULL }, // PS3 Midi Pro Adapter - Squire Guitar Mode
|
||||
{ MAKE_CONTROLLER_ID( 0x1345, 0x1000 ), k_eControllerType_PS3Controller, NULL }, // PS2 ACME GA-D5
|
||||
{ MAKE_CONTROLLER_ID( 0x1345, 0x6005 ), k_eControllerType_PS3Controller, NULL }, // ps2 maybe break out later
|
||||
{ MAKE_CONTROLLER_ID( 0x146b, 0x5500 ), k_eControllerType_PS3Controller, NULL }, // From SDL
|
||||
{ MAKE_CONTROLLER_ID( 0x1a34, 0x0836 ), k_eControllerType_PS3Controller, NULL }, // Afterglow PS3
|
||||
{ MAKE_CONTROLLER_ID( 0x1BAD, 0x0004 ), k_eControllerType_PS3Controller, NULL }, // Wii RB1 Guitar (Uses PS3 protocol)
|
||||
{ MAKE_CONTROLLER_ID( 0x1BAD, 0x0005 ), k_eControllerType_PS3Controller, NULL }, // Wii RB1 Drums (Uses PS3 protocol)
|
||||
{ MAKE_CONTROLLER_ID( 0x1BAD, 0x3010 ), k_eControllerType_PS3Controller, NULL }, // Wii RB2 Guitar (Uses PS3 protocol)
|
||||
{ MAKE_CONTROLLER_ID( 0x1BAD, 0x3110 ), k_eControllerType_PS3Controller, NULL }, // Wii RB2 Drums (Uses PS3 protocol)
|
||||
{ MAKE_CONTROLLER_ID( 0x1BAD, 0x3138 ), k_eControllerType_PS3Controller, NULL }, // Wii RB3 Midi Pro Adapter - Drums Mode (Uses PS3 protocol)
|
||||
{ MAKE_CONTROLLER_ID( 0x1BAD, 0x3330 ), k_eControllerType_PS3Controller, NULL }, // Wii RB3 Keyboard (Uses PS3 protocol)
|
||||
{ MAKE_CONTROLLER_ID( 0x1BAD, 0x3338 ), k_eControllerType_PS3Controller, NULL }, // Wii RB3 Midi Pro Adapter - Keyboard Mode (Uses PS3 protocol)
|
||||
{ MAKE_CONTROLLER_ID( 0x1BAD, 0x3430 ), k_eControllerType_PS3Controller, NULL }, // Wii RB3 Mustang Guitar (Uses PS3 protocol)
|
||||
{ MAKE_CONTROLLER_ID( 0x1BAD, 0x3438 ), k_eControllerType_PS3Controller, NULL }, // Wii RB3 Midi Pro Adapter - Mustang Guitar Mode (Uses PS3 protocol)
|
||||
{ MAKE_CONTROLLER_ID( 0x1BAD, 0x3530 ), k_eControllerType_PS3Controller, NULL }, // Wii RB3 Squire Guitar (Uses PS3 protocol)
|
||||
{ MAKE_CONTROLLER_ID( 0x1BAD, 0x3538 ), k_eControllerType_PS3Controller, NULL }, // Wii RB3 Midi Pro Adapter - Squire Guitar Mode (Uses PS3 protocol)
|
||||
{ MAKE_CONTROLLER_ID( 0x20bc, 0x5500 ), k_eControllerType_PS3Controller, NULL }, // ShanWan PS3
|
||||
{ MAKE_CONTROLLER_ID( 0x20d6, 0x576d ), k_eControllerType_PS3Controller, NULL }, // Power A PS3
|
||||
{ MAKE_CONTROLLER_ID( 0x20d6, 0xca6d ), k_eControllerType_PS3Controller, NULL }, // From SDL
|
||||
{ MAKE_CONTROLLER_ID( 0x20d6, 0xca6d ), k_eControllerType_PS3Controller, NULL }, // BDA Pro Ex
|
||||
{ MAKE_CONTROLLER_ID( 0x2563, 0x0523 ), k_eControllerType_PS3Controller, NULL }, // Digiflip GP006
|
||||
{ MAKE_CONTROLLER_ID( 0x2563, 0x0575 ), k_eControllerType_PS3Controller, NULL }, // From SDL
|
||||
{ MAKE_CONTROLLER_ID( 0x2563, 0x0575 ), k_eControllerType_PS3Controller, "Retro Controller" }, // SWITCH CO., LTD. Retro-bit, Retro Fighters Controllers
|
||||
{ MAKE_CONTROLLER_ID( 0x25f0, 0x83c3 ), k_eControllerType_PS3Controller, NULL }, // gioteck vx2
|
||||
{ MAKE_CONTROLLER_ID( 0x25f0, 0xc121 ), k_eControllerType_PS3Controller, NULL }, //
|
||||
{ MAKE_CONTROLLER_ID( 0x2c22, 0x2003 ), k_eControllerType_PS3Controller, NULL }, // Qanba Drone
|
||||
@@ -95,8 +119,10 @@ static const ControllerDescription_t arrControllers[] = {
|
||||
{ MAKE_CONTROLLER_ID( 0x0c12, 0x0ef6 ), k_eControllerType_PS4Controller, NULL }, // Hitbox Arcade Stick
|
||||
{ MAKE_CONTROLLER_ID( 0x0c12, 0x1cf6 ), k_eControllerType_PS4Controller, NULL }, // EMIO PS4 Elite Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x0c12, 0x1e10 ), k_eControllerType_PS4Controller, NULL }, // P4 Wired Gamepad generic knock off - lightbar but not trackpad or gyro
|
||||
{ MAKE_CONTROLLER_ID( 0x0c12, 0x2e18 ), k_eControllerType_PS4Controller, NULL }, // ZEROPLUS P4 Wired Gamepad
|
||||
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0203 ), k_eControllerType_PS4Controller, NULL }, // Victrix Pro FS (PS4 peripheral but no trackpad/lightbar)
|
||||
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0207 ), k_eControllerType_PS4Controller, NULL }, // Victrix Pro FS V2 w/ Touchpad for PS4
|
||||
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x020a ), k_eControllerType_PS4Controller, NULL }, // Victrix Pro FS PS4/PS5 (PS4 mode)
|
||||
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x0055 ), k_eControllerType_PS4Controller, NULL }, // HORIPAD 4 FPS
|
||||
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x005e ), k_eControllerType_PS4Controller, NULL }, // HORI Fighting Commander 4 PS4
|
||||
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x0066 ), k_eControllerType_PS4Controller, NULL }, // HORIPAD 4 FPS Plus
|
||||
@@ -119,13 +145,13 @@ static const ControllerDescription_t arrControllers[] = {
|
||||
{ MAKE_CONTROLLER_ID( 0x146b, 0x0609 ), k_eControllerType_XInputPS4Controller, NULL }, // NACON Wireless Controller for PS4
|
||||
{ MAKE_CONTROLLER_ID( 0x146b, 0x0d01 ), k_eControllerType_PS4Controller, NULL }, // Nacon Revolution Pro Controller - has gyro
|
||||
{ MAKE_CONTROLLER_ID( 0x146b, 0x0d02 ), k_eControllerType_PS4Controller, NULL }, // Nacon Revolution Pro Controller v2 - has gyro
|
||||
{ MAKE_CONTROLLER_ID( 0x146b, 0x0d06 ), k_eControllerType_PS4Controller, NULL }, // NACON Asymetrical Controller Wireless Dongle -- show up as ps4 until you connect controller to it then it reboots into Xbox controller with different vvid/pid
|
||||
{ MAKE_CONTROLLER_ID( 0x146b, 0x0d06 ), k_eControllerType_PS4Controller, NULL }, // NACON Asymmetric Controller Wireless Dongle -- show up as ps4 until you connect controller to it then it reboots into Xbox controller with different vvid/pid
|
||||
{ MAKE_CONTROLLER_ID( 0x146b, 0x0d08 ), k_eControllerType_PS4Controller, NULL }, // NACON Revolution Unlimited Wireless Dongle
|
||||
{ MAKE_CONTROLLER_ID( 0x146b, 0x0d09 ), k_eControllerType_PS4Controller, NULL }, // NACON Daija Fight Stick - touchpad but no gyro/rumble
|
||||
{ MAKE_CONTROLLER_ID( 0x146b, 0x0d10 ), k_eControllerType_PS4Controller, NULL }, // NACON Revolution Infinite - has gyro
|
||||
{ MAKE_CONTROLLER_ID( 0x146b, 0x0d10 ), k_eControllerType_PS4Controller, NULL }, // NACON Revolution Unlimited
|
||||
{ MAKE_CONTROLLER_ID( 0x146b, 0x0d13 ), k_eControllerType_PS4Controller, NULL }, // NACON Revolution Pro Controller 3
|
||||
{ MAKE_CONTROLLER_ID( 0x146b, 0x1103 ), k_eControllerType_PS4Controller, NULL }, // NACON Asymetrical Controller -- on windows this doesn't enumerate
|
||||
{ MAKE_CONTROLLER_ID( 0x146b, 0x1103 ), k_eControllerType_PS4Controller, NULL }, // NACON Asymmetric Controller -- on windows this doesn't enumerate
|
||||
{ MAKE_CONTROLLER_ID( 0x1532, 0X0401 ), k_eControllerType_PS4Controller, NULL }, // Razer Panthera PS4 Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x1532, 0x1000 ), k_eControllerType_PS4Controller, NULL }, // Razer Raiju PS4 Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x1532, 0x1004 ), k_eControllerType_PS4Controller, NULL }, // Razer Raiju 2 Ultimate USB
|
||||
@@ -140,6 +166,8 @@ static const ControllerDescription_t arrControllers[] = {
|
||||
{ MAKE_CONTROLLER_ID( 0x2c22, 0x2303 ), k_eControllerType_XInputPS4Controller, NULL }, // Qanba Obsidian Arcade Joystick
|
||||
{ MAKE_CONTROLLER_ID( 0x2c22, 0x2500 ), k_eControllerType_PS4Controller, NULL }, // Qanba Dragon
|
||||
{ MAKE_CONTROLLER_ID( 0x2c22, 0x2503 ), k_eControllerType_XInputPS4Controller, NULL }, // Qanba Dragon Arcade Joystick
|
||||
{ MAKE_CONTROLLER_ID( 0x3285, 0x0d16 ), k_eControllerType_PS4Controller, NULL }, // NACON Revolution 5 Pro (PS4 mode with dongle)
|
||||
{ MAKE_CONTROLLER_ID( 0x3285, 0x0d17 ), k_eControllerType_PS4Controller, NULL }, // NACON Revolution 5 Pro (PS4 mode wired)
|
||||
{ MAKE_CONTROLLER_ID( 0x7545, 0x0104 ), k_eControllerType_PS4Controller, NULL }, // Armor 3 or Level Up Cobra - At least one variant has gyro
|
||||
{ MAKE_CONTROLLER_ID (0x9886, 0x0024 ), k_eControllerType_XInputPS4Controller, NULL }, // Astro C40 in Xbox 360 mode
|
||||
{ MAKE_CONTROLLER_ID( 0x9886, 0x0025 ), k_eControllerType_PS4Controller, NULL }, // Astro C40
|
||||
@@ -147,25 +175,35 @@ static const ControllerDescription_t arrControllers[] = {
|
||||
// { MAKE_CONTROLLER_ID( 0x7545, 0x1122 ), k_eControllerType_PS4Controller, NULL }, // Giotek VX4 - trackpad/gyro don't work. Had to not filter on interface info. Light bar is flaky, but works.
|
||||
|
||||
{ MAKE_CONTROLLER_ID( 0x054c, 0x0ce6 ), k_eControllerType_PS5Controller, NULL }, // Sony DualSense Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x054c, 0x0df2 ), k_eControllerType_PS5Controller, NULL }, // Sony DualSense Edge Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x054c, 0x0e5f ), k_eControllerType_PS5Controller, NULL }, // Access Controller for PS5
|
||||
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0209 ), k_eControllerType_PS5Controller, NULL }, // Victrix Pro FS PS4/PS5 (PS5 mode)
|
||||
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x0163 ), k_eControllerType_PS5Controller, NULL }, // HORI Fighting Commander OCTA
|
||||
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x0184 ), k_eControllerType_PS5Controller, NULL }, // Hori Fighting Stick α
|
||||
{ MAKE_CONTROLLER_ID( 0x1532, 0x100b ), k_eControllerType_PS5Controller, NULL }, // Razer Wolverine V2 Pro (Wired)
|
||||
{ MAKE_CONTROLLER_ID( 0x1532, 0x100c ), k_eControllerType_PS5Controller, NULL }, // Razer Wolverine V2 Pro (Wireless)
|
||||
{ MAKE_CONTROLLER_ID( 0x1532, 0x1012 ), k_eControllerType_PS5Controller, NULL }, // Razer Kitsune
|
||||
{ MAKE_CONTROLLER_ID( 0x1532, 0x1024 ), k_eControllerType_PS5Controller, NULL }, // Razer Raiju V3 Pro (PS5 mode wired)
|
||||
{ MAKE_CONTROLLER_ID( 0x1532, 0x1026 ), k_eControllerType_PS5Controller, NULL }, // Razer Raiju V3 Pro (PS5 mode with dongle)
|
||||
{ MAKE_CONTROLLER_ID( 0x3285, 0x0d18 ), k_eControllerType_PS5Controller, NULL }, // NACON Revolution 5 Pro (PS5 mode with dongle)
|
||||
{ MAKE_CONTROLLER_ID( 0x3285, 0x0d19 ), k_eControllerType_PS5Controller, NULL }, // NACON Revolution 5 Pro (PS5 mode wired)
|
||||
{ MAKE_CONTROLLER_ID( 0x358a, 0x0104 ), k_eControllerType_PS5Controller, NULL }, // Backbone One PlayStation Edition for iOS
|
||||
{ MAKE_CONTROLLER_ID( 0x358a, 0x0304 ), k_eControllerType_PS5Controller, NULL }, // Backbone One PlayStation Edition Gen 2
|
||||
|
||||
{ MAKE_CONTROLLER_ID( 0x0079, 0x0006 ), k_eControllerType_UnknownNonSteamController, NULL }, // DragonRise Generic USB PCB, sometimes configured as a PC Twin Shock Controller - looks like a DS3 but the face buttons are 1-4 instead of symbols
|
||||
|
||||
{ MAKE_CONTROLLER_ID( 0x0079, 0x18d4 ), k_eControllerType_XBox360Controller, NULL }, // GPD Win 2 X-Box Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x0351, 0x1000 ), k_eControllerType_XBox360Controller, NULL }, // CRKD Guitar
|
||||
{ MAKE_CONTROLLER_ID( 0x0351, 0x2000 ), k_eControllerType_XBox360Controller, NULL }, // CRKD Guitar
|
||||
{ MAKE_CONTROLLER_ID( 0x03eb, 0xff02 ), k_eControllerType_XBox360Controller, NULL }, // Wooting Two
|
||||
{ MAKE_CONTROLLER_ID( 0x044f, 0xb326 ), k_eControllerType_XBox360Controller, NULL }, // Thrustmaster Gamepad GP XID
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x028e ), k_eControllerType_XBox360Controller, "Xbox 360 Controller" }, // Microsoft X-Box 360 pad
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x028f ), k_eControllerType_XBox360Controller, "Xbox 360 Controller" }, // Microsoft X-Box 360 pad v2
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x0291 ), k_eControllerType_XBox360Controller, "Xbox 360 Wireless Controller" }, // Xbox 360 Wireless Receiver (XBOX)
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x02a0 ), k_eControllerType_XBox360Controller, NULL }, // Microsoft X-Box 360 Big Button IR
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x02a1 ), k_eControllerType_XBox360Controller, NULL }, // Microsoft X-Box 360 Wireless Controller with XUSB driver on Windows
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x02a9 ), k_eControllerType_XBox360Controller, "Xbox 360 Wireless Controller" }, // Xbox 360 Wireless Receiver (third party knockoff)
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x0719 ), k_eControllerType_XBox360Controller, "Xbox 360 Wireless Controller" }, // Xbox 360 Wireless Receiver
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x028e ), k_eControllerType_XBox360Controller, "Xbox 360 Controller" }, // Microsoft Xbox 360 Wired Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x028f ), k_eControllerType_XBox360Controller, "Xbox 360 Controller" }, // Microsoft Xbox 360 Play and Charge Cable
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x0291 ), k_eControllerType_XBox360Controller, "Xbox 360 Wireless Controller" }, // X-box 360 Wireless Receiver (third party knockoff)
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x02a0 ), k_eControllerType_XBox360Controller, NULL }, // Microsoft Xbox 360 Big Button IR
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x02a1 ), k_eControllerType_XBox360Controller, "Xbox 360 Wireless Controller" }, // Microsoft Xbox 360 Wireless Controller with XUSB driver on Windows
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x02a2 ), k_eControllerType_XBox360Controller, "Xbox 360 Wireless Racing Wheel" }, // Xbox 360 Wireless Racing Wheel with XUSB driver on Windows
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x02a9 ), k_eControllerType_XBox360Controller, "Xbox 360 Wireless Controller" }, // X-box 360 Wireless Receiver (third party knockoff)
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x0719 ), k_eControllerType_XBox360Controller, "Xbox 360 Wireless Controller" }, // Microsoft Xbox 360 Wireless Receiver
|
||||
{ MAKE_CONTROLLER_ID( 0x046d, 0xc21d ), k_eControllerType_XBox360Controller, NULL }, // Logitech Gamepad F310
|
||||
{ MAKE_CONTROLLER_ID( 0x046d, 0xc21e ), k_eControllerType_XBox360Controller, NULL }, // Logitech Gamepad F510
|
||||
{ MAKE_CONTROLLER_ID( 0x046d, 0xc21f ), k_eControllerType_XBox360Controller, NULL }, // Logitech Gamepad F710
|
||||
@@ -173,6 +211,8 @@ static const ControllerDescription_t arrControllers[] = {
|
||||
{ MAKE_CONTROLLER_ID( 0x056e, 0x2004 ), k_eControllerType_XBox360Controller, NULL }, // Elecom JC-U3613M
|
||||
// This isn't actually an Xbox 360 controller, it just looks like one
|
||||
// { MAKE_CONTROLLER_ID( 0x06a3, 0xf51a ), k_eControllerType_XBox360Controller, NULL }, // Saitek P3600
|
||||
{ MAKE_CONTROLLER_ID( 0x0738, 0x02A6 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Wireless Rock Band Guitar
|
||||
{ MAKE_CONTROLLER_ID( 0x0738, 0x02AB ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Wireless Precision Bass Guitar
|
||||
{ MAKE_CONTROLLER_ID( 0x0738, 0x4716 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Wired Xbox 360 Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x0738, 0x4718 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Street Fighter IV FightStick SE
|
||||
{ MAKE_CONTROLLER_ID( 0x0738, 0x4726 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Xbox 360 Controller
|
||||
@@ -180,6 +220,7 @@ static const ControllerDescription_t arrControllers[] = {
|
||||
{ MAKE_CONTROLLER_ID( 0x0738, 0x4736 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz MicroCon Gamepad
|
||||
{ MAKE_CONTROLLER_ID( 0x0738, 0x4738 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Wired Xbox 360 Controller (SFIV)
|
||||
{ MAKE_CONTROLLER_ID( 0x0738, 0x4740 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Beat Pad
|
||||
{ MAKE_CONTROLLER_ID( 0x0738, 0x9806 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Precision Bass Guitar
|
||||
{ MAKE_CONTROLLER_ID( 0x0738, 0xb726 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Xbox controller - MW2
|
||||
{ MAKE_CONTROLLER_ID( 0x0738, 0xbeef ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz JOYTECH NEO SE Advanced GamePad
|
||||
{ MAKE_CONTROLLER_ID( 0x0738, 0xcb02 ), k_eControllerType_XBox360Controller, NULL }, // Saitek Cyborg Rumble Pad - PC/Xbox 360
|
||||
@@ -187,6 +228,7 @@ static const ControllerDescription_t arrControllers[] = {
|
||||
{ MAKE_CONTROLLER_ID( 0x0738, 0xf738 ), k_eControllerType_XBox360Controller, NULL }, // Super SFIV FightStick TE S
|
||||
{ MAKE_CONTROLLER_ID( 0x0955, 0x7210 ), k_eControllerType_XBox360Controller, NULL }, // Nvidia Shield local controller
|
||||
{ MAKE_CONTROLLER_ID( 0x0955, 0xb400 ), k_eControllerType_XBox360Controller, NULL }, // NVIDIA Shield streaming controller
|
||||
{ MAKE_CONTROLLER_ID( 0x0b05, 0x1b4c ), k_eControllerType_XBox360Controller, NULL }, // ASUS ROG Ally X built-in controller
|
||||
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0105 ), k_eControllerType_XBox360Controller, NULL }, // HSM3 Xbox360 dancepad
|
||||
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0113 ), k_eControllerType_XBox360Controller, "PDP Xbox 360 Afterglow" }, // PDP Afterglow Gamepad for Xbox 360
|
||||
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x011f ), k_eControllerType_XBox360Controller, "PDP Xbox 360 Rock Candy" }, // PDP Rock Candy Gamepad for Xbox 360
|
||||
@@ -222,6 +264,14 @@ static const ControllerDescription_t arrControllers[] = {
|
||||
{ MAKE_CONTROLLER_ID( 0x12ab, 0x0301 ), k_eControllerType_XBox360Controller, NULL }, // PDP AFTERGLOW AX.1
|
||||
{ MAKE_CONTROLLER_ID( 0x12ab, 0x0303 ), k_eControllerType_XBox360Controller, NULL }, // Mortal Kombat Klassic FightStick
|
||||
{ MAKE_CONTROLLER_ID( 0x1430, 0x02a0 ), k_eControllerType_XBox360Controller, NULL }, // RedOctane Controller Adapter
|
||||
{ MAKE_CONTROLLER_ID( 0x1430, 0x02a7 ), k_eControllerType_XBox360Controller, NULL }, // Guitar Hero Wireless Guitar (Linux)
|
||||
{ MAKE_CONTROLLER_ID( 0x1430, 0x02a8 ), k_eControllerType_XBox360Controller, NULL }, // Guitar Hero Wireless Drum Kit (Linux)
|
||||
{ MAKE_CONTROLLER_ID( 0x1430, 0x0705 ), k_eControllerType_XBox360Controller, NULL }, // Guitar Hero 5 Guitar
|
||||
{ MAKE_CONTROLLER_ID( 0x1430, 0x070B ), k_eControllerType_XBox360Controller, NULL }, // Guitar Hero Live Guitar
|
||||
{ MAKE_CONTROLLER_ID( 0x1430, 0x0805 ), k_eControllerType_XBox360Controller, NULL }, // Band Hero Wireless Drum Kit
|
||||
{ MAKE_CONTROLLER_ID( 0x1430, 0x1715 ), k_eControllerType_XBox360Controller, NULL }, // DJ Hero Turntable (Wired)
|
||||
{ MAKE_CONTROLLER_ID( 0x1430, 0x1705 ), k_eControllerType_XBox360Controller, NULL }, // DJ Hero Turntable (Wireless)
|
||||
{ MAKE_CONTROLLER_ID( 0x1430, 0x4734 ), k_eControllerType_XBox360Controller, NULL }, // Guitar Hero World Tour Kiosk
|
||||
{ MAKE_CONTROLLER_ID( 0x1430, 0x4748 ), k_eControllerType_XBox360Controller, NULL }, // RedOctane Guitar Hero X-plorer
|
||||
{ MAKE_CONTROLLER_ID( 0x1430, 0xf801 ), k_eControllerType_XBox360Controller, NULL }, // RedOctane Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x146b, 0x0601 ), k_eControllerType_XBox360Controller, NULL }, // BigBen Interactive XBOX 360 Controller
|
||||
@@ -234,8 +284,17 @@ static const ControllerDescription_t arrControllers[] = {
|
||||
{ MAKE_CONTROLLER_ID( 0x1689, 0xfd01 ), k_eControllerType_XBox360Controller, NULL }, // Razer Onza Classic Edition
|
||||
{ MAKE_CONTROLLER_ID( 0x1689, 0xfe00 ), k_eControllerType_XBox360Controller, NULL }, // Razer Sabertooth
|
||||
{ MAKE_CONTROLLER_ID( 0x1949, 0x041a ), k_eControllerType_XBox360Controller, "Amazon Luna Controller" }, // Amazon Luna Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x1bad, 0x0002 ), k_eControllerType_XBox360Controller, NULL }, // Harmonix Rock Band Guitar
|
||||
{ MAKE_CONTROLLER_ID( 0x1bad, 0x0002 ), k_eControllerType_XBox360Controller, NULL }, // Harmonix Rock Band 1 Guitar
|
||||
{ MAKE_CONTROLLER_ID( 0x1bad, 0x0003 ), k_eControllerType_XBox360Controller, NULL }, // Harmonix Rock Band Drumkit
|
||||
{ MAKE_CONTROLLER_ID( 0x1bad, 0x0130 ), k_eControllerType_XBox360Controller, NULL }, // ION Drum Rocker
|
||||
{ MAKE_CONTROLLER_ID( 0x1bad, 0x02a6 ), k_eControllerType_XBox360Controller, NULL }, // Rock Band 2 Wireless Guitar (Linux)
|
||||
{ MAKE_CONTROLLER_ID( 0x1bad, 0x02ab ), k_eControllerType_XBox360Controller, NULL }, // Rock Band Wireless Bass Guitar (Linux)
|
||||
{ MAKE_CONTROLLER_ID( 0x1bad, 0x1330 ), k_eControllerType_XBox360Controller, NULL }, // Rock Band Keyboard (Mustang)
|
||||
{ MAKE_CONTROLLER_ID( 0x1bad, 0x1338 ), k_eControllerType_XBox360Controller, NULL }, // Rock Band MIDI Pro Adapter (Keyboard)
|
||||
{ MAKE_CONTROLLER_ID( 0x1bad, 0x1430 ), k_eControllerType_XBox360Controller, NULL }, // Rock Band Pro Guitar (Mustang)
|
||||
{ MAKE_CONTROLLER_ID( 0x1bad, 0x1530 ), k_eControllerType_XBox360Controller, NULL }, // Rock Band Pro Guitar (Squire)
|
||||
{ MAKE_CONTROLLER_ID( 0x1bad, 0x1438 ), k_eControllerType_XBox360Controller, NULL }, // Rock Band MIDI Pro Adapter (Mustang Guitar)
|
||||
{ MAKE_CONTROLLER_ID( 0x1bad, 0x1538 ), k_eControllerType_XBox360Controller, NULL }, // Rock Band MIDI Pro Adapter (Squire Guitar)
|
||||
{ MAKE_CONTROLLER_ID( 0x1bad, 0xf016 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Xbox 360 Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x1bad, 0xf018 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Street Fighter IV SE Fighting Stick
|
||||
{ MAKE_CONTROLLER_ID( 0x1bad, 0xf019 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Brawlstick for Xbox 360
|
||||
@@ -269,6 +328,8 @@ static const ControllerDescription_t arrControllers[] = {
|
||||
{ MAKE_CONTROLLER_ID( 0x1bad, 0xfa01 ), k_eControllerType_XBox360Controller, NULL }, // MadCatz GamePad
|
||||
{ MAKE_CONTROLLER_ID( 0x1bad, 0xfd00 ), k_eControllerType_XBox360Controller, NULL }, // Razer Onza TE
|
||||
{ MAKE_CONTROLLER_ID( 0x1bad, 0xfd01 ), k_eControllerType_XBox360Controller, NULL }, // Razer Onza
|
||||
{ MAKE_CONTROLLER_ID( 0x2068, 0x0001 ), k_eControllerType_XBox360Controller, NULL }, // Power Gig Guitar
|
||||
{ MAKE_CONTROLLER_ID( 0x2068, 0x0002 ), k_eControllerType_XBox360Controller, NULL }, // Power Gig Drums
|
||||
{ MAKE_CONTROLLER_ID( 0x24c6, 0x5000 ), k_eControllerType_XBox360Controller, NULL }, // Razer Atrox Arcade Stick
|
||||
{ MAKE_CONTROLLER_ID( 0x24c6, 0x5300 ), k_eControllerType_XBox360Controller, NULL }, // PowerA MINI PROEX Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x24c6, 0x5303 ), k_eControllerType_XBox360Controller, NULL }, // Xbox Airflo wired controller
|
||||
@@ -292,26 +353,25 @@ static const ControllerDescription_t arrControllers[] = {
|
||||
{ MAKE_CONTROLLER_ID( 0x24c6, 0xfafb ), k_eControllerType_XBox360Controller, NULL }, // Aplay Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x24c6, 0xfafc ), k_eControllerType_XBox360Controller, NULL }, // Afterglow Gamepad 1
|
||||
{ MAKE_CONTROLLER_ID( 0x24c6, 0xfafd ), k_eControllerType_XBox360Controller, NULL }, // Afterglow Gamepad 3
|
||||
{ MAKE_CONTROLLER_ID( 0x3537, 0x103e ), k_eControllerType_XBox360Controller, "Gamesir Xbox Controller" }, // Gamesir dongle for Supernova (and maybe others) in Xinput mode
|
||||
{ MAKE_CONTROLLER_ID( 0x24c6, 0xfafe ), k_eControllerType_XBox360Controller, NULL }, // Rock Candy Gamepad for Xbox 360
|
||||
{ MAKE_CONTROLLER_ID( 0x3651, 0x1000 ), k_eControllerType_XBox360Controller, NULL }, // CRKD Guitar
|
||||
{ MAKE_CONTROLLER_ID( 0x3651, 0x6000 ), k_eControllerType_XBox360Controller, NULL }, // CRKD Guitar
|
||||
|
||||
{ MAKE_CONTROLLER_ID( 0x03f0, 0x0495 ), k_eControllerType_XBoxOneController, NULL }, // HP HyperX Clutch Gladiate
|
||||
{ MAKE_CONTROLLER_ID( 0x044f, 0xd012 ), k_eControllerType_XBoxOneController, NULL }, // ThrustMaster eSwap PRO Controller Xbox
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x02d1 ), k_eControllerType_XBoxOneController, "Xbox One Controller" }, // Microsoft X-Box One pad
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x02dd ), k_eControllerType_XBoxOneController, "Xbox One Controller" }, // Microsoft X-Box One pad (Firmware 2015)
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x02e0 ), k_eControllerType_XBoxOneController, "Xbox One S Controller" }, // Microsoft X-Box One S pad (Bluetooth)
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x02e3 ), k_eControllerType_XBoxOneController, "Xbox One Elite Controller" }, // Microsoft X-Box One Elite pad
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x02ea ), k_eControllerType_XBoxOneController, "Xbox One S Controller" }, // Microsoft X-Box One S pad
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x02fd ), k_eControllerType_XBoxOneController, "Xbox One S Controller" }, // Microsoft X-Box One S pad (Bluetooth)
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x02ff ), k_eControllerType_XBoxOneController, NULL }, // Microsoft X-Box One controller with XBOXGIP driver on Windows
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x0b00 ), k_eControllerType_XBoxOneController, "Xbox One Elite 2 Controller" }, // Microsoft X-Box One Elite Series 2 pad
|
||||
// { MAKE_CONTROLLER_ID( 0x045e, 0x0b02 ), k_eControllerType_XBoxOneController, "Xbox One Elite 2 Controller" }, // The virtual keyboard generated by XboxGip drivers for Xbox One Controllers (see https://github.com/libsdl-org/SDL/pull/5121 for details)
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x0b05 ), k_eControllerType_XBoxOneController, "Xbox One Elite 2 Controller" }, // Microsoft X-Box One Elite Series 2 pad (Bluetooth)
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x0b0a ), k_eControllerType_XBoxOneController, "Xbox Adaptive Controller" }, // Microsoft X-Box Adaptive pad
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x0b0c ), k_eControllerType_XBoxOneController, "Xbox Adaptive Controller" }, // Microsoft X-Box Adaptive pad (Bluetooth)
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x0b12 ), k_eControllerType_XBoxOneController, "Xbox Series X Controller" }, // Microsoft X-Box Series X pad
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x0b13 ), k_eControllerType_XBoxOneController, "Xbox Series X Controller" }, // Microsoft X-Box Series X pad (BLE)
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x0b20 ), k_eControllerType_XBoxOneController, "Xbox One S Controller" }, // Microsoft X-Box One S pad (BLE)
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x0b21 ), k_eControllerType_XBoxOneController, "Xbox Adaptive Controller" }, // Microsoft X-Box Adaptive pad (BLE)
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x0b22 ), k_eControllerType_XBoxOneController, "Xbox One Elite 2 Controller" }, // Microsoft X-Box One Elite Series 2 pad (BLE)
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x02d1 ), k_eControllerType_XBoxOneController, "Xbox One Controller" }, // Microsoft Xbox One Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x02dd ), k_eControllerType_XBoxOneController, "Xbox One Controller" }, // Microsoft Xbox One Controller (Firmware 2015)
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x02e0 ), k_eControllerType_XBoxOneController, "Xbox One S Controller" }, // Microsoft Xbox One S Controller (Bluetooth)
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x02ea ), k_eControllerType_XBoxOneController, "Xbox One S Controller" }, // Microsoft Xbox One S Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x02fd ), k_eControllerType_XBoxOneController, "Xbox One S Controller" }, // Microsoft Xbox One S Controller (Bluetooth)
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x02ff ), k_eControllerType_XBoxOneController, "Xbox One Controller" }, // Microsoft Xbox One Controller with XBOXGIP driver on Windows
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x0b0a ), k_eControllerType_XBoxOneController, "Xbox Adaptive Controller" }, // Microsoft Xbox Adaptive Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x0b0c ), k_eControllerType_XBoxOneController, "Xbox Adaptive Controller" }, // Microsoft Xbox Adaptive Controller (Bluetooth)
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x0b12 ), k_eControllerType_XBoxOneController, "Xbox Series X Controller" }, // Microsoft Xbox Series X Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x0b13 ), k_eControllerType_XBoxOneController, "Xbox Series X Controller" }, // Microsoft Xbox Series X Controller (BLE)
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x0b20 ), k_eControllerType_XBoxOneController, "Xbox One S Controller" }, // Microsoft Xbox One S Controller (BLE)
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x0b21 ), k_eControllerType_XBoxOneController, "Xbox Adaptive Controller" }, // Microsoft Xbox Adaptive Controller (BLE)
|
||||
{ MAKE_CONTROLLER_ID( 0x0738, 0x4a01 ), k_eControllerType_XBoxOneController, NULL }, // Mad Catz FightStick TE 2
|
||||
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0139 ), k_eControllerType_XBoxOneController, "PDP Xbox One Afterglow" }, // PDP Afterglow Wired Controller for Xbox One
|
||||
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x013B ), k_eControllerType_XBoxOneController, "PDP Xbox One Face-Off Controller" }, // PDP Face-Off Gamepad for Xbox One
|
||||
@@ -408,7 +468,7 @@ static const ControllerDescription_t arrControllers[] = {
|
||||
{ MAKE_CONTROLLER_ID( 0x20d6, 0x2012 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X Cuphead EnWired Controller - Mugman
|
||||
{ MAKE_CONTROLLER_ID( 0x20d6, 0x2015 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller - Blue Hint
|
||||
{ MAKE_CONTROLLER_ID( 0x20d6, 0x2016 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller - Green Hint
|
||||
{ MAKE_CONTROLLER_ID( 0x20d6, 0x2017 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Cntroller - Arctic Camo
|
||||
{ MAKE_CONTROLLER_ID( 0x20d6, 0x2017 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller - Arctic Camo
|
||||
{ MAKE_CONTROLLER_ID( 0x20d6, 0x2018 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Arc Lightning
|
||||
{ MAKE_CONTROLLER_ID( 0x20d6, 0x2019 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Royal Purple
|
||||
{ MAKE_CONTROLLER_ID( 0x20d6, 0x201a ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Nebula
|
||||
@@ -425,14 +485,14 @@ static const ControllerDescription_t arrControllers[] = {
|
||||
{ MAKE_CONTROLLER_ID( 0x24c6, 0x592a ), k_eControllerType_XBoxOneController, NULL }, // BDA XB1 Spectra Pro
|
||||
{ MAKE_CONTROLLER_ID( 0x24c6, 0x791a ), k_eControllerType_XBoxOneController, NULL }, // PowerA Fusion Fight Pad
|
||||
{ MAKE_CONTROLLER_ID( 0x2dc8, 0x2002 ), k_eControllerType_XBoxOneController, NULL }, // 8BitDo Ultimate Wired Controller for Xbox
|
||||
{ MAKE_CONTROLLER_ID( 0x2dc8, 0x3106 ), k_eControllerType_XBoxOneController, NULL }, // 8BitDo Ultimate Wired Controller. Windows, Android, Switch.
|
||||
{ MAKE_CONTROLLER_ID( 0x2dc8, 0x310a ), k_eControllerType_XBoxOneController, NULL }, // 8BitDo Ultimate 2C Wireless Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x2e24, 0x0652 ), k_eControllerType_XBoxOneController, NULL }, // Hyperkin Duke
|
||||
{ MAKE_CONTROLLER_ID( 0x2e24, 0x1618 ), k_eControllerType_XBoxOneController, NULL }, // Hyperkin Duke
|
||||
{ MAKE_CONTROLLER_ID( 0x2e24, 0x1688 ), k_eControllerType_XBoxOneController, NULL }, // Hyperkin X91
|
||||
{ MAKE_CONTROLLER_ID( 0x146b, 0x0611 ), k_eControllerType_XBoxOneController, NULL }, // Xbox Controller Mode for NACON Revolution 3
|
||||
|
||||
// These have been added via Minidump for unrecognized Xinput controller assert
|
||||
{ MAKE_CONTROLLER_ID( 0x0000, 0x0000 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x02a2 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller - Microsoft VID
|
||||
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x1414 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0159 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x24c6, 0xfaff ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller
|
||||
@@ -444,6 +504,7 @@ static const ControllerDescription_t arrControllers[] = {
|
||||
{ MAKE_CONTROLLER_ID( 0x03eb, 0xff01 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x0c12, 0x0ef8 ), k_eControllerType_XBox360Controller, NULL }, // Homemade fightstick based on brook pcb (with XInput driver??)
|
||||
{ MAKE_CONTROLLER_ID( 0x046d, 0x1000 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x11ff, 0x0511 ), k_eControllerType_XBox360Controller, NULL }, // PXN V900
|
||||
{ MAKE_CONTROLLER_ID( 0x1345, 0x6006 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller
|
||||
|
||||
{ MAKE_CONTROLLER_ID( 0x056e, 0x2012 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller
|
||||
@@ -456,7 +517,6 @@ static const ControllerDescription_t arrControllers[] = {
|
||||
{ MAKE_CONTROLLER_ID( 0x046d, 0x0291 ), k_eControllerType_XBox360Controller, NULL }, // logitech xinput
|
||||
{ MAKE_CONTROLLER_ID( 0x0079, 0x18d3 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x00b1 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x0001, 0x0001 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x0079, 0x188e ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x0079, 0x187c ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x0079, 0x189c ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller
|
||||
@@ -469,15 +529,12 @@ static const ControllerDescription_t arrControllers[] = {
|
||||
{ MAKE_CONTROLLER_ID( 0xf0d, 0xed ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
|
||||
{ MAKE_CONTROLLER_ID( 0xf0d, 0xc0 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
|
||||
{ MAKE_CONTROLLER_ID( 0xe6f, 0x152 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
|
||||
{ MAKE_CONTROLLER_ID( 0xe6f, 0x2a7 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x46d, 0x1007 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
|
||||
{ MAKE_CONTROLLER_ID( 0xe6f, 0x2b8 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
|
||||
{ MAKE_CONTROLLER_ID( 0xe6f, 0x2a8 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x79, 0x18a1 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
|
||||
|
||||
/* Added from Minidumps 10-9-19 */
|
||||
// Added from Minidumps 10-9-19
|
||||
{ MAKE_CONTROLLER_ID( 0x0, 0x6686 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x11ff, 0x511 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x12ab, 0x304 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x1430, 0x291 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x1430, 0x2a9 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
|
||||
@@ -514,14 +571,7 @@ static const ControllerDescription_t arrControllers[] = {
|
||||
{ MAKE_CONTROLLER_ID( 0xd62, 0x9a1b ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
|
||||
{ MAKE_CONTROLLER_ID( 0xe00, 0xe00 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
|
||||
{ MAKE_CONTROLLER_ID( 0xe6f, 0x12a ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
|
||||
{ MAKE_CONTROLLER_ID( 0xe6f, 0x2a1 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
|
||||
{ MAKE_CONTROLLER_ID( 0xe6f, 0x2a2 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
|
||||
{ MAKE_CONTROLLER_ID( 0xe6f, 0x2a5 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
|
||||
{ MAKE_CONTROLLER_ID( 0xe6f, 0x2b2 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
|
||||
{ MAKE_CONTROLLER_ID( 0xe6f, 0x2bd ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
|
||||
{ MAKE_CONTROLLER_ID( 0xe6f, 0x2bf ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
|
||||
{ MAKE_CONTROLLER_ID( 0xe6f, 0x2c0 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
|
||||
{ MAKE_CONTROLLER_ID( 0xe6f, 0x2c6 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
|
||||
{ MAKE_CONTROLLER_ID( 0xf0d, 0x97 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
|
||||
{ MAKE_CONTROLLER_ID( 0xf0d, 0xba ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
|
||||
{ MAKE_CONTROLLER_ID( 0xf0d, 0xd8 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
|
||||
@@ -532,14 +582,12 @@ static const ControllerDescription_t arrControllers[] = {
|
||||
{ MAKE_CONTROLLER_ID( 0x2f24, 0x8f ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
|
||||
{ MAKE_CONTROLLER_ID( 0xe6f, 0xf501 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
|
||||
|
||||
//{ MAKE_CONTROLLER_ID( 0x1949, 0x0402 ), /*android*/, NULL }, // Unknown Controller
|
||||
|
||||
{ MAKE_CONTROLLER_ID( 0x05ac, 0x0001 ), k_eControllerType_AppleController, NULL }, // MFI Extended Gamepad (generic entry for iOS/tvOS)
|
||||
{ MAKE_CONTROLLER_ID( 0x05ac, 0x0002 ), k_eControllerType_AppleController, NULL }, // MFI Standard Gamepad (generic entry for iOS/tvOS)
|
||||
|
||||
{ MAKE_CONTROLLER_ID( 0x057e, 0x2006 ), k_eControllerType_SwitchJoyConLeft, NULL }, // Nintendo Switch Joy-Con (Left)
|
||||
{ MAKE_CONTROLLER_ID( 0x057e, 0x2067 ), k_eControllerType_SwitchJoyConLeft, NULL }, // Nintendo Switch 2 Joy-Con (Left)
|
||||
{ MAKE_CONTROLLER_ID( 0x057e, 0x2007 ), k_eControllerType_SwitchJoyConRight, NULL }, // Nintendo Switch Joy-Con (Right)
|
||||
{ MAKE_CONTROLLER_ID( 0x057e, 0x2066 ), k_eControllerType_SwitchJoyConRight, NULL }, // Nintendo Switch 2 Joy-Con (Right)
|
||||
{ MAKE_CONTROLLER_ID( 0x057e, 0x2008 ), k_eControllerType_SwitchJoyConPair, NULL }, // Nintendo Switch Joy-Con (Left+Right Combined)
|
||||
{ MAKE_CONTROLLER_ID( 0x057e, 0x2068 ), k_eControllerType_SwitchJoyConPair, NULL }, // Nintendo Switch 2 Joy-Con (Left+Right Combined)
|
||||
|
||||
// This same controller ID is spoofed by many 3rd-party Switch controllers.
|
||||
// The ones we currently know of are:
|
||||
@@ -548,6 +596,7 @@ static const ControllerDescription_t arrControllers[] = {
|
||||
// * ZhiXu Gamepad Wireless
|
||||
// * Sunwaytek Wireless Motion Controller for Nintendo Switch
|
||||
{ MAKE_CONTROLLER_ID( 0x057e, 0x2009 ), k_eControllerType_SwitchProController, NULL }, // Nintendo Switch Pro Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x057e, 0x2069 ), k_eControllerType_Switch2ProController, NULL }, // Nintendo Switch 2 Pro Controller
|
||||
//{ MAKE_CONTROLLER_ID( 0x057e, 0x2017 ), k_eControllerType_SwitchProController, NULL }, // Nintendo Online SNES Controller
|
||||
//{ MAKE_CONTROLLER_ID( 0x057e, 0x2019 ), k_eControllerType_SwitchProController, NULL }, // Nintendo Online N64 Controller
|
||||
//{ MAKE_CONTROLLER_ID( 0x057e, 0x201e ), k_eControllerType_SwitchProController, NULL }, // Nintendo Online SEGA Genesis Controller
|
||||
@@ -564,7 +613,7 @@ static const ControllerDescription_t arrControllers[] = {
|
||||
// The first two, at least, shouldn't have their buttons remapped, and since we
|
||||
// can't tell which model we're actually using, we won't do any button remapping
|
||||
// for any of them.
|
||||
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x00dc ), k_eControllerType_XInputSwitchController, NULL }, // HORIPAD S - Looks like a Switch controller but uses the Xbox 360 controller protocol
|
||||
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x00dc ), k_eControllerType_XInputSwitchController, NULL }, // HORIPAD S - Looks like a Switch controller but uses the Xbox 360 controller protocol, there is also a version of this that looks like a GameCube controller
|
||||
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0180 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PDP Faceoff Wired Pro Controller for Nintendo Switch
|
||||
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0181 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PDP Faceoff Deluxe Wired Pro Controller for Nintendo Switch
|
||||
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0184 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PDP Faceoff Wired Deluxe+ Audio Controller
|
||||
@@ -572,6 +621,12 @@ static const ControllerDescription_t arrControllers[] = {
|
||||
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0186 ), k_eControllerType_SwitchProController, NULL }, // PDP Afterglow Wireless Switch Controller - working gyro. USB is for charging only. Many later "Wireless" line devices w/ gyro also use this vid/pid
|
||||
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0187 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PDP Rockcandy Wired Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0188 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PDP Afterglow Wired Deluxe+ Audio Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x018b ), k_eControllerType_SwitchInputOnlyController, NULL }, // PDP Afterglow Wave Wired/Wireless Controller for Switch
|
||||
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x018c ), k_eControllerType_SwitchProController, "PDP REALMz Wireless Controller" }, // PDP REALMz Wireless Controller for Switch
|
||||
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0193 ), k_eControllerType_Switch2ProController, NULL }, // Turtle Beach Afterglow Wireless RGB Gaming Controller for Nintendo Switch 2 and the Turtle Beach Rematch Wireless RGB Gaming Controller for Nintendo Switch 2
|
||||
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0196 ), k_eControllerType_Switch2InputOnlyController, NULL }, // Turtle Beach Rematch Wired Controller for Nintendo Switch 2
|
||||
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0197 ), k_eControllerType_Switch2InputOnlyController, NULL }, // Turtle Beach Afterglow Wave Wired Controller for Nintendo Switch 2
|
||||
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0198 ), k_eControllerType_Switch2InputOnlyController, NULL }, // Turtle Beach Afterglow Wired Controller for Switch 2
|
||||
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x00aa ), k_eControllerType_SwitchInputOnlyController, NULL }, // HORI Real Arcade Pro V Hayabusa in Switch Mode
|
||||
{ MAKE_CONTROLLER_ID( 0x20d6, 0xa711 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PowerA Wired Controller Plus/PowerA Wired Controller Nintendo GameCube Style
|
||||
{ MAKE_CONTROLLER_ID( 0x20d6, 0xa712 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PowerA Nintendo Switch Fusion Fight Pad
|
||||
@@ -579,6 +634,27 @@ static const ControllerDescription_t arrControllers[] = {
|
||||
{ MAKE_CONTROLLER_ID( 0x20d6, 0xa714 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PowerA Nintendo Switch Spectra Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x20d6, 0xa715 ), k_eControllerType_SwitchInputOnlyController, NULL }, // Power A Fusion Wireless Arcade Stick (USB Mode) Over BT is shows up as 057e 2009
|
||||
{ MAKE_CONTROLLER_ID( 0x20d6, 0xa716 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PowerA Nintendo Switch Fusion Pro Controller - USB requires toggling switch on back of device
|
||||
{ MAKE_CONTROLLER_ID( 0x20d6, 0xa718 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PowerA Nintendo Switch Nano Wired Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x33dd, 0x0001 ), k_eControllerType_SwitchInputOnlyController, NULL }, // ZUIKI MasCon for Nintendo Switch Black
|
||||
{ MAKE_CONTROLLER_ID( 0x33dd, 0x0002 ), k_eControllerType_SwitchInputOnlyController, NULL }, // ZUIKI MasCon for Nintendo Switch ??
|
||||
{ MAKE_CONTROLLER_ID( 0x33dd, 0x0003 ), k_eControllerType_SwitchInputOnlyController, NULL }, // ZUIKI MasCon for Nintendo Switch Red
|
||||
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x00f0 ), k_eControllerType_SwitchInputOnlyController, NULL }, // HORI Taiko Controller For Switch
|
||||
|
||||
{ MAKE_CONTROLLER_ID( 0x054c, 0x0df2 ), k_eControllerType_PS5EdgeController, NULL }, // Sony DualSense Edge Controller
|
||||
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x02e3 ), k_eControllerType_XBoxEliteController, "Xbox One Elite Controller" }, // Microsoft Xbox One Elite Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x0b00 ), k_eControllerType_XBoxEliteController, "Xbox One Elite 2 Controller" }, // Microsoft Xbox One Elite Series 2 Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x0b05 ), k_eControllerType_XBoxEliteController, "Xbox One Elite 2 Controller" }, // Microsoft Xbox One Elite Series 2 Controller (Bluetooth)
|
||||
{ MAKE_CONTROLLER_ID( 0x045e, 0x0b22 ), k_eControllerType_XBoxEliteController, "Xbox One Elite 2 Controller" }, // Microsoft Xbox One Elite Series 2 Controller (BLE)
|
||||
|
||||
{ MAKE_CONTROLLER_ID( 0x2dc8, 0x6000 ), k_eControllerType_8BitDoController, "8Bitdo SF30 Controller" }, // 8BitDo SF30 Pro Controller in Steam Mode
|
||||
{ MAKE_CONTROLLER_ID( 0x2dc8, 0x6100 ), k_eControllerType_8BitDoController, "8Bitdo SF30 Controller" }, // 8BitDo SF30 Pro Controller in Steam Mode (Bluetooth)
|
||||
{ MAKE_CONTROLLER_ID( 0x2dc8, 0x6001 ), k_eControllerType_8BitDoController, "8Bitdo SN30 Controller" }, // 8BitDo SN30 Pro Controller in Steam Mode
|
||||
{ MAKE_CONTROLLER_ID( 0x2dc8, 0x6101 ), k_eControllerType_8BitDoController, "8Bitdo SN30 Controller" }, // 8BitDo SN30 Pro Controller in Steam Mode (Bluetooth)
|
||||
{ MAKE_CONTROLLER_ID( 0x2dc8, 0x6003 ), k_eControllerType_8BitDoController, "8Bitdo Pro 2 Controller" }, // 8BitDo Pro 2 Controller in Steam Mode
|
||||
{ MAKE_CONTROLLER_ID( 0x2dc8, 0x6006 ), k_eControllerType_8BitDoController, "8Bitdo Pro 2 Controller" }, // 8BitDo Pro 2 Controller in Steam Mode
|
||||
{ MAKE_CONTROLLER_ID( 0x2dc8, 0x6009 ), k_eControllerType_8BitDoController, "8Bitdo Pro 3 Controller" }, // 8BitDo Pro 3 Controller in Steam Mode (Bluetooth)
|
||||
{ MAKE_CONTROLLER_ID( 0x2dc8, 0x6012 ), k_eControllerType_8BitDoController, "8Bitdo Ultimate 2 Wireless Controller" }, // 8BitDo Ultimate 2 Wireless Controller in Steam Mode (Bluetooth)
|
||||
|
||||
// Valve products
|
||||
{ MAKE_CONTROLLER_ID( 0x0000, 0x11fb ), k_eControllerType_MobileTouch, NULL }, // Streaming mobile touch virtual controls
|
||||
@@ -586,7 +662,16 @@ static const ControllerDescription_t arrControllers[] = {
|
||||
{ MAKE_CONTROLLER_ID( 0x28de, 0x1102 ), k_eControllerType_SteamController, NULL }, // Valve wired Steam Controller (D0G)
|
||||
{ MAKE_CONTROLLER_ID( 0x28de, 0x1105 ), k_eControllerType_SteamController, NULL }, // Valve Bluetooth Steam Controller (D0G)
|
||||
{ MAKE_CONTROLLER_ID( 0x28de, 0x1106 ), k_eControllerType_SteamController, NULL }, // Valve Bluetooth Steam Controller (D0G)
|
||||
{ MAKE_CONTROLLER_ID( 0x28de, 0x11ff ), k_eControllerType_UnknownNonSteamController, NULL }, // Steam Virtual Gamepad
|
||||
{ MAKE_CONTROLLER_ID( 0x28de, 0x1142 ), k_eControllerType_SteamController, NULL }, // Valve wireless Steam Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x28de, 0x1201 ), k_eControllerType_SteamControllerV2, NULL }, // Valve wired Steam Controller (HEADCRAB)
|
||||
{ MAKE_CONTROLLER_ID( 0x28de, 0x1202 ), k_eControllerType_SteamControllerV2, NULL }, // Valve Bluetooth Steam Controller (HEADCRAB)
|
||||
{ MAKE_CONTROLLER_ID( 0x28de, 0x1205 ), k_eControllerType_SteamControllerNeptune, NULL }, // Valve Steam Deck Builtin Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x28de, 0x1302 ), k_eControllerType_SteamControllerTriton, NULL }, // Valve Steam Triton Controller
|
||||
{ MAKE_CONTROLLER_ID( 0x28de, 0x1303 ), k_eControllerType_SteamControllerTriton, NULL }, // Valve Steam Triton Controller (BLE)
|
||||
{ MAKE_CONTROLLER_ID( 0x28de, 0x1304 ), k_eControllerType_SteamControllerTriton, NULL }, // Valve Steam Proteus Dongle (Proprietary)
|
||||
{ MAKE_CONTROLLER_ID( 0x28de, 0x1305 ), k_eControllerType_SteamControllerTriton, NULL }, // Valve Steam Nereid Dongle (Proprietary)
|
||||
|
||||
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x01AB ), k_eControllerType_HoriSteamController, NULL }, // HORI Wireless HORIPAD for Steam
|
||||
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x0196 ), k_eControllerType_HoriSteamController, NULL }, // HORI Wireless HORIPAD for Steam ( BT )
|
||||
};
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Steam Controller models
|
||||
// Purpose: Steam Controller models
|
||||
// WARNING: DO NOT RENUMBER EXISTING VALUES - STORED IN A DATABASE
|
||||
//-----------------------------------------------------------------------------
|
||||
typedef enum
|
||||
@@ -37,6 +37,9 @@ typedef enum
|
||||
k_eControllerType_UnknownSteamController = 1,
|
||||
k_eControllerType_SteamController = 2,
|
||||
k_eControllerType_SteamControllerV2 = 3,
|
||||
k_eControllerType_SteamControllerNeptune = 4,
|
||||
|
||||
k_eControllerType_SteamControllerTriton = 10,
|
||||
|
||||
// Other Controllers
|
||||
k_eControllerType_UnknownNonSteamController = 30,
|
||||
@@ -55,7 +58,13 @@ typedef enum
|
||||
k_eControllerType_MobileTouch = 43,
|
||||
k_eControllerType_XInputSwitchController = 44, // Client-side only, used to mark Nintendo Switch style controllers as using XInput instead of the Nintendo Switch protocol
|
||||
k_eControllerType_PS5Controller = 45,
|
||||
k_eControllerType_XInputPS4Controller = 46, // Client-side only, used to mark DualShock 4 style controllers using XInput instead of the DualShock 4 controller protocol
|
||||
k_eControllerType_XBoxEliteController = 46,
|
||||
k_eControllerType_XInputPS4Controller = 47, // Client-side only, used to mark DualShock 4 style controllers using XInput instead of the DualShock 4 controller protocol
|
||||
k_eControllerType_PS5EdgeController = 48,
|
||||
k_eControllerType_HoriSteamController = 49,
|
||||
k_eControllerType_8BitDoController = 50,
|
||||
k_eControllerType_Switch2ProController = 51,
|
||||
k_eControllerType_Switch2InputOnlyController = 52,
|
||||
k_eControllerType_LastController, // Don't add game controllers below this enumeration - this enumeration can change value
|
||||
|
||||
// Keyboards and Mice
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,100 +0,0 @@
|
||||
ANDROID_API_TARGET=21
|
||||
PARALLEL_JOBS=$(nproc)
|
||||
|
||||
rm -r ./android
|
||||
mkdir android
|
||||
|
||||
function build_one
|
||||
{
|
||||
PREFIX=$(pwd)/android/$CPU
|
||||
SYSROOT=$NDK/platforms/android-$ANDROID_API_TARGET/arch-$SYSROOT_CPU
|
||||
TOOLCHAIN_PATH=$NDK/toolchains/$TOOLCHAIN_DIR/prebuilt/linux-x86_64
|
||||
export PATH=$PATH:$TOOLCHAIN_PATH/bin
|
||||
./configure \
|
||||
--build=x86_64-unknown-linux-gnu \
|
||||
--host=$TOOLCHAIN_BIN_PREFIX \
|
||||
--target=$TOOLCHAIN_BIN_PREFIX \
|
||||
CFLAGS="--sysroot=$SYSROOT -O2 $ADDI_CFLAGS" \
|
||||
$ADDI_CONFIGURE_FLAGS
|
||||
make clean
|
||||
make -j$PARALLEL_JOBS
|
||||
mkdir android/$CPU
|
||||
cp .libs/libopus.a android/$CPU
|
||||
}
|
||||
|
||||
function build_mips
|
||||
{
|
||||
CPU=mips
|
||||
SYSROOT_CPU=mips
|
||||
TOOLCHAIN_BIN_PREFIX=mipsel-linux-android
|
||||
TOOLCHAIN_DIR=mipsel-linux-android-4.9
|
||||
ADDI_CFLAGS="-mips32 -mhard-float -EL -mno-dsp"
|
||||
ADDI_CONFIGURE_FLAGS="--enable-fixed-point" # fixed point
|
||||
build_one
|
||||
}
|
||||
|
||||
function build_mips64
|
||||
{
|
||||
CPU=mips64
|
||||
SYSROOT_CPU=mips64
|
||||
TOOLCHAIN_BIN_PREFIX=mips64el-linux-android
|
||||
TOOLCHAIN_DIR=mips64el-linux-android-4.9
|
||||
ADDI_CFLAGS="-mips64r6"
|
||||
ADDI_CONFIGURE_FLAGS="--enable-fixed-point" # fixed point
|
||||
build_one
|
||||
}
|
||||
|
||||
function build_x86
|
||||
{
|
||||
CPU=x86
|
||||
SYSROOT_CPU=x86
|
||||
TOOLCHAIN_BIN_PREFIX=i686-linux-android
|
||||
TOOLCHAIN_DIR=x86-4.9
|
||||
ADDI_CFLAGS="-march=i686 -mtune=atom -mstackrealign -msse -msse2 -msse3 -mssse3 -mfpmath=sse -m32"
|
||||
ADDI_CONFIGURE_FLAGS="" # floating point for SSE optimizations
|
||||
build_one
|
||||
}
|
||||
|
||||
function build_x86_64
|
||||
{
|
||||
CPU=x86_64
|
||||
SYSROOT_CPU=x86_64
|
||||
TOOLCHAIN_BIN_PREFIX=x86_64-linux-android
|
||||
TOOLCHAIN_DIR=x86_64-4.9
|
||||
ADDI_CFLAGS="-msse -msse2 -msse3 -mssse3 -msse4 -msse4.1 -msse4.2 -mpopcnt -m64"
|
||||
ADDI_CONFIGURE_FLAGS="" # floating point for SSE optimizations
|
||||
build_one
|
||||
}
|
||||
|
||||
function build_armv7
|
||||
{
|
||||
CPU=arm
|
||||
SYSROOT_CPU=arm
|
||||
TOOLCHAIN_BIN_PREFIX=arm-linux-androideabi
|
||||
TOOLCHAIN_DIR=arm-linux-androideabi-4.9
|
||||
ADDI_CFLAGS="-marm -mfpu=vfpv3-d16"
|
||||
ADDI_LDFLAGS=""
|
||||
ADDI_CONFIGURE_FLAGS="--enable-fixed-point" # fixed point for NEON, EDSP, Media
|
||||
build_one
|
||||
}
|
||||
|
||||
# ARMv8 doesn't currently have assembly in the opus project. We still use fixed point
|
||||
# anyway in the hopes that it will be more performant even without assembly.
|
||||
function build_armv8
|
||||
{
|
||||
CPU=aarch64
|
||||
SYSROOT_CPU=arm64
|
||||
TOOLCHAIN_BIN_PREFIX=aarch64-linux-android
|
||||
TOOLCHAIN_DIR=aarch64-linux-android-4.9
|
||||
ADDI_CFLAGS=""
|
||||
ADDI_LDFLAGS=""
|
||||
ADDI_CONFIGURE_FLAGS="--enable-fixed-point"
|
||||
build_one
|
||||
}
|
||||
|
||||
build_mips
|
||||
build_mips64
|
||||
build_x86
|
||||
build_x86_64
|
||||
build_armv7
|
||||
build_armv8
|
||||
@@ -1,342 +0,0 @@
|
||||
/* Copyright (c) 2007-2008 CSIRO
|
||||
Copyright (c) 2007-2009 Xiph.Org Foundation
|
||||
Copyright (c) 2008-2012 Gregory Maxwell
|
||||
Written by Jean-Marc Valin and Gregory Maxwell */
|
||||
/*
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
|
||||
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/**
|
||||
@file opus_custom.h
|
||||
@brief Opus-Custom reference implementation API
|
||||
*/
|
||||
|
||||
#ifndef OPUS_CUSTOM_H
|
||||
#define OPUS_CUSTOM_H
|
||||
|
||||
#include "opus_defines.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef CUSTOM_MODES
|
||||
# define OPUS_CUSTOM_EXPORT OPUS_EXPORT
|
||||
# define OPUS_CUSTOM_EXPORT_STATIC OPUS_EXPORT
|
||||
#else
|
||||
# define OPUS_CUSTOM_EXPORT
|
||||
# ifdef OPUS_BUILD
|
||||
# define OPUS_CUSTOM_EXPORT_STATIC static OPUS_INLINE
|
||||
# else
|
||||
# define OPUS_CUSTOM_EXPORT_STATIC
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/** @defgroup opus_custom Opus Custom
|
||||
* @{
|
||||
* Opus Custom is an optional part of the Opus specification and
|
||||
* reference implementation which uses a distinct API from the regular
|
||||
* API and supports frame sizes that are not normally supported.\ Use
|
||||
* of Opus Custom is discouraged for all but very special applications
|
||||
* for which a frame size different from 2.5, 5, 10, or 20 ms is needed
|
||||
* (for either complexity or latency reasons) and where interoperability
|
||||
* is less important.
|
||||
*
|
||||
* In addition to the interoperability limitations the use of Opus custom
|
||||
* disables a substantial chunk of the codec and generally lowers the
|
||||
* quality available at a given bitrate. Normally when an application needs
|
||||
* a different frame size from the codec it should buffer to match the
|
||||
* sizes but this adds a small amount of delay which may be important
|
||||
* in some very low latency applications. Some transports (especially
|
||||
* constant rate RF transports) may also work best with frames of
|
||||
* particular durations.
|
||||
*
|
||||
* Libopus only supports custom modes if they are enabled at compile time.
|
||||
*
|
||||
* The Opus Custom API is similar to the regular API but the
|
||||
* @ref opus_encoder_create and @ref opus_decoder_create calls take
|
||||
* an additional mode parameter which is a structure produced by
|
||||
* a call to @ref opus_custom_mode_create. Both the encoder and decoder
|
||||
* must create a mode using the same sample rate (fs) and frame size
|
||||
* (frame size) so these parameters must either be signaled out of band
|
||||
* or fixed in a particular implementation.
|
||||
*
|
||||
* Similar to regular Opus the custom modes support on the fly frame size
|
||||
* switching, but the sizes available depend on the particular frame size in
|
||||
* use. For some initial frame sizes on a single on the fly size is available.
|
||||
*/
|
||||
|
||||
/** Contains the state of an encoder. One encoder state is needed
|
||||
for each stream. It is initialized once at the beginning of the
|
||||
stream. Do *not* re-initialize the state for every frame.
|
||||
@brief Encoder state
|
||||
*/
|
||||
typedef struct OpusCustomEncoder OpusCustomEncoder;
|
||||
|
||||
/** State of the decoder. One decoder state is needed for each stream.
|
||||
It is initialized once at the beginning of the stream. Do *not*
|
||||
re-initialize the state for every frame.
|
||||
@brief Decoder state
|
||||
*/
|
||||
typedef struct OpusCustomDecoder OpusCustomDecoder;
|
||||
|
||||
/** The mode contains all the information necessary to create an
|
||||
encoder. Both the encoder and decoder need to be initialized
|
||||
with exactly the same mode, otherwise the output will be
|
||||
corrupted.
|
||||
@brief Mode configuration
|
||||
*/
|
||||
typedef struct OpusCustomMode OpusCustomMode;
|
||||
|
||||
/** Creates a new mode struct. This will be passed to an encoder or
|
||||
* decoder. The mode MUST NOT BE DESTROYED until the encoders and
|
||||
* decoders that use it are destroyed as well.
|
||||
* @param [in] Fs <tt>int</tt>: Sampling rate (8000 to 96000 Hz)
|
||||
* @param [in] frame_size <tt>int</tt>: Number of samples (per channel) to encode in each
|
||||
* packet (64 - 1024, prime factorization must contain zero or more 2s, 3s, or 5s and no other primes)
|
||||
* @param [out] error <tt>int*</tt>: Returned error code (if NULL, no error will be returned)
|
||||
* @return A newly created mode
|
||||
*/
|
||||
OPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT OpusCustomMode *opus_custom_mode_create(opus_int32 Fs, int frame_size, int *error);
|
||||
|
||||
/** Destroys a mode struct. Only call this after all encoders and
|
||||
* decoders using this mode are destroyed as well.
|
||||
* @param [in] mode <tt>OpusCustomMode*</tt>: Mode to be freed.
|
||||
*/
|
||||
OPUS_CUSTOM_EXPORT void opus_custom_mode_destroy(OpusCustomMode *mode);
|
||||
|
||||
|
||||
#if !defined(OPUS_BUILD) || defined(CELT_ENCODER_C)
|
||||
|
||||
/* Encoder */
|
||||
/** Gets the size of an OpusCustomEncoder structure.
|
||||
* @param [in] mode <tt>OpusCustomMode *</tt>: Mode configuration
|
||||
* @param [in] channels <tt>int</tt>: Number of channels
|
||||
* @returns size
|
||||
*/
|
||||
OPUS_CUSTOM_EXPORT_STATIC OPUS_WARN_UNUSED_RESULT int opus_custom_encoder_get_size(
|
||||
const OpusCustomMode *mode,
|
||||
int channels
|
||||
) OPUS_ARG_NONNULL(1);
|
||||
|
||||
# ifdef CUSTOM_MODES
|
||||
/** Initializes a previously allocated encoder state
|
||||
* The memory pointed to by st must be the size returned by opus_custom_encoder_get_size.
|
||||
* This is intended for applications which use their own allocator instead of malloc.
|
||||
* @see opus_custom_encoder_create(),opus_custom_encoder_get_size()
|
||||
* To reset a previously initialized state use the OPUS_RESET_STATE CTL.
|
||||
* @param [in] st <tt>OpusCustomEncoder*</tt>: Encoder state
|
||||
* @param [in] mode <tt>OpusCustomMode *</tt>: Contains all the information about the characteristics of
|
||||
* the stream (must be the same characteristics as used for the
|
||||
* decoder)
|
||||
* @param [in] channels <tt>int</tt>: Number of channels
|
||||
* @return OPUS_OK Success or @ref opus_errorcodes
|
||||
*/
|
||||
OPUS_CUSTOM_EXPORT int opus_custom_encoder_init(
|
||||
OpusCustomEncoder *st,
|
||||
const OpusCustomMode *mode,
|
||||
int channels
|
||||
) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
/** Creates a new encoder state. Each stream needs its own encoder
|
||||
* state (can't be shared across simultaneous streams).
|
||||
* @param [in] mode <tt>OpusCustomMode*</tt>: Contains all the information about the characteristics of
|
||||
* the stream (must be the same characteristics as used for the
|
||||
* decoder)
|
||||
* @param [in] channels <tt>int</tt>: Number of channels
|
||||
* @param [out] error <tt>int*</tt>: Returns an error code
|
||||
* @return Newly created encoder state.
|
||||
*/
|
||||
OPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT OpusCustomEncoder *opus_custom_encoder_create(
|
||||
const OpusCustomMode *mode,
|
||||
int channels,
|
||||
int *error
|
||||
) OPUS_ARG_NONNULL(1);
|
||||
|
||||
|
||||
/** Destroys a an encoder state.
|
||||
* @param[in] st <tt>OpusCustomEncoder*</tt>: State to be freed.
|
||||
*/
|
||||
OPUS_CUSTOM_EXPORT void opus_custom_encoder_destroy(OpusCustomEncoder *st);
|
||||
|
||||
/** Encodes a frame of audio.
|
||||
* @param [in] st <tt>OpusCustomEncoder*</tt>: Encoder state
|
||||
* @param [in] pcm <tt>float*</tt>: PCM audio in float format, with a normal range of +/-1.0.
|
||||
* Samples with a range beyond +/-1.0 are supported but will
|
||||
* be clipped by decoders using the integer API and should
|
||||
* only be used if it is known that the far end supports
|
||||
* extended dynamic range. There must be exactly
|
||||
* frame_size samples per channel.
|
||||
* @param [in] frame_size <tt>int</tt>: Number of samples per frame of input signal
|
||||
* @param [out] compressed <tt>char *</tt>: The compressed data is written here. This may not alias pcm and must be at least maxCompressedBytes long.
|
||||
* @param [in] maxCompressedBytes <tt>int</tt>: Maximum number of bytes to use for compressing the frame
|
||||
* (can change from one frame to another)
|
||||
* @return Number of bytes written to "compressed".
|
||||
* If negative, an error has occurred (see error codes). It is IMPORTANT that
|
||||
* the length returned be somehow transmitted to the decoder. Otherwise, no
|
||||
* decoding is possible.
|
||||
*/
|
||||
OPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT int opus_custom_encode_float(
|
||||
OpusCustomEncoder *st,
|
||||
const float *pcm,
|
||||
int frame_size,
|
||||
unsigned char *compressed,
|
||||
int maxCompressedBytes
|
||||
) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2) OPUS_ARG_NONNULL(4);
|
||||
|
||||
/** Encodes a frame of audio.
|
||||
* @param [in] st <tt>OpusCustomEncoder*</tt>: Encoder state
|
||||
* @param [in] pcm <tt>opus_int16*</tt>: PCM audio in signed 16-bit format (native endian).
|
||||
* There must be exactly frame_size samples per channel.
|
||||
* @param [in] frame_size <tt>int</tt>: Number of samples per frame of input signal
|
||||
* @param [out] compressed <tt>char *</tt>: The compressed data is written here. This may not alias pcm and must be at least maxCompressedBytes long.
|
||||
* @param [in] maxCompressedBytes <tt>int</tt>: Maximum number of bytes to use for compressing the frame
|
||||
* (can change from one frame to another)
|
||||
* @return Number of bytes written to "compressed".
|
||||
* If negative, an error has occurred (see error codes). It is IMPORTANT that
|
||||
* the length returned be somehow transmitted to the decoder. Otherwise, no
|
||||
* decoding is possible.
|
||||
*/
|
||||
OPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT int opus_custom_encode(
|
||||
OpusCustomEncoder *st,
|
||||
const opus_int16 *pcm,
|
||||
int frame_size,
|
||||
unsigned char *compressed,
|
||||
int maxCompressedBytes
|
||||
) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2) OPUS_ARG_NONNULL(4);
|
||||
|
||||
/** Perform a CTL function on an Opus custom encoder.
|
||||
*
|
||||
* Generally the request and subsequent arguments are generated
|
||||
* by a convenience macro.
|
||||
* @see opus_encoderctls
|
||||
*/
|
||||
OPUS_CUSTOM_EXPORT int opus_custom_encoder_ctl(OpusCustomEncoder * OPUS_RESTRICT st, int request, ...) OPUS_ARG_NONNULL(1);
|
||||
|
||||
|
||||
#if !defined(OPUS_BUILD) || defined(CELT_DECODER_C)
|
||||
/* Decoder */
|
||||
|
||||
/** Gets the size of an OpusCustomDecoder structure.
|
||||
* @param [in] mode <tt>OpusCustomMode *</tt>: Mode configuration
|
||||
* @param [in] channels <tt>int</tt>: Number of channels
|
||||
* @returns size
|
||||
*/
|
||||
OPUS_CUSTOM_EXPORT_STATIC OPUS_WARN_UNUSED_RESULT int opus_custom_decoder_get_size(
|
||||
const OpusCustomMode *mode,
|
||||
int channels
|
||||
) OPUS_ARG_NONNULL(1);
|
||||
|
||||
/** Initializes a previously allocated decoder state
|
||||
* The memory pointed to by st must be the size returned by opus_custom_decoder_get_size.
|
||||
* This is intended for applications which use their own allocator instead of malloc.
|
||||
* @see opus_custom_decoder_create(),opus_custom_decoder_get_size()
|
||||
* To reset a previously initialized state use the OPUS_RESET_STATE CTL.
|
||||
* @param [in] st <tt>OpusCustomDecoder*</tt>: Decoder state
|
||||
* @param [in] mode <tt>OpusCustomMode *</tt>: Contains all the information about the characteristics of
|
||||
* the stream (must be the same characteristics as used for the
|
||||
* encoder)
|
||||
* @param [in] channels <tt>int</tt>: Number of channels
|
||||
* @return OPUS_OK Success or @ref opus_errorcodes
|
||||
*/
|
||||
OPUS_CUSTOM_EXPORT_STATIC int opus_custom_decoder_init(
|
||||
OpusCustomDecoder *st,
|
||||
const OpusCustomMode *mode,
|
||||
int channels
|
||||
) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/** Creates a new decoder state. Each stream needs its own decoder state (can't
|
||||
* be shared across simultaneous streams).
|
||||
* @param [in] mode <tt>OpusCustomMode</tt>: Contains all the information about the characteristics of the
|
||||
* stream (must be the same characteristics as used for the encoder)
|
||||
* @param [in] channels <tt>int</tt>: Number of channels
|
||||
* @param [out] error <tt>int*</tt>: Returns an error code
|
||||
* @return Newly created decoder state.
|
||||
*/
|
||||
OPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT OpusCustomDecoder *opus_custom_decoder_create(
|
||||
const OpusCustomMode *mode,
|
||||
int channels,
|
||||
int *error
|
||||
) OPUS_ARG_NONNULL(1);
|
||||
|
||||
/** Destroys a an decoder state.
|
||||
* @param[in] st <tt>OpusCustomDecoder*</tt>: State to be freed.
|
||||
*/
|
||||
OPUS_CUSTOM_EXPORT void opus_custom_decoder_destroy(OpusCustomDecoder *st);
|
||||
|
||||
/** Decode an opus custom frame with floating point output
|
||||
* @param [in] st <tt>OpusCustomDecoder*</tt>: Decoder state
|
||||
* @param [in] data <tt>char*</tt>: Input payload. Use a NULL pointer to indicate packet loss
|
||||
* @param [in] len <tt>int</tt>: Number of bytes in payload
|
||||
* @param [out] pcm <tt>float*</tt>: Output signal (interleaved if 2 channels). length
|
||||
* is frame_size*channels*sizeof(float)
|
||||
* @param [in] frame_size Number of samples per channel of available space in *pcm.
|
||||
* @returns Number of decoded samples or @ref opus_errorcodes
|
||||
*/
|
||||
OPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT int opus_custom_decode_float(
|
||||
OpusCustomDecoder *st,
|
||||
const unsigned char *data,
|
||||
int len,
|
||||
float *pcm,
|
||||
int frame_size
|
||||
) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(4);
|
||||
|
||||
/** Decode an opus custom frame
|
||||
* @param [in] st <tt>OpusCustomDecoder*</tt>: Decoder state
|
||||
* @param [in] data <tt>char*</tt>: Input payload. Use a NULL pointer to indicate packet loss
|
||||
* @param [in] len <tt>int</tt>: Number of bytes in payload
|
||||
* @param [out] pcm <tt>opus_int16*</tt>: Output signal (interleaved if 2 channels). length
|
||||
* is frame_size*channels*sizeof(opus_int16)
|
||||
* @param [in] frame_size Number of samples per channel of available space in *pcm.
|
||||
* @returns Number of decoded samples or @ref opus_errorcodes
|
||||
*/
|
||||
OPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT int opus_custom_decode(
|
||||
OpusCustomDecoder *st,
|
||||
const unsigned char *data,
|
||||
int len,
|
||||
opus_int16 *pcm,
|
||||
int frame_size
|
||||
) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(4);
|
||||
|
||||
/** Perform a CTL function on an Opus custom decoder.
|
||||
*
|
||||
* Generally the request and subsequent arguments are generated
|
||||
* by a convenience macro.
|
||||
* @see opus_genericctls
|
||||
*/
|
||||
OPUS_CUSTOM_EXPORT int opus_custom_decoder_ctl(OpusCustomDecoder * OPUS_RESTRICT st, int request, ...) OPUS_ARG_NONNULL(1);
|
||||
|
||||
/**@}*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* OPUS_CUSTOM_H */
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -22,86 +22,222 @@
|
||||
// This file includes a few functions standalone from SDL_joystick.c useful for joystick typing
|
||||
|
||||
#include "minisdl.h"
|
||||
#include "controller_type.h"
|
||||
#include "controller_list.h"
|
||||
#include "usb_ids.h"
|
||||
|
||||
SDL_bool SDL_IsJoystickXboxOneElite(Uint16 vendor_id, Uint16 product_id)
|
||||
// Macro to combine a USB vendor ID and product ID into a single Uint32 value
|
||||
#define MAKE_VIDPID(VID, PID) (((Uint32)(VID)) << 16 | (PID))
|
||||
|
||||
static Uint32 initial_old_xboxone_controllers[] = {
|
||||
MAKE_VIDPID(0x0000, 0x6686),
|
||||
MAKE_VIDPID(0x0079, 0x18a1),
|
||||
MAKE_VIDPID(0x0079, 0x18c2),
|
||||
MAKE_VIDPID(0x0079, 0x18c8),
|
||||
MAKE_VIDPID(0x0079, 0x18cf),
|
||||
MAKE_VIDPID(0x03f0, 0x0495),
|
||||
MAKE_VIDPID(0x045e, 0x02d1),
|
||||
MAKE_VIDPID(0x045e, 0x02dd),
|
||||
MAKE_VIDPID(0x045e, 0x02e0),
|
||||
MAKE_VIDPID(0x045e, 0x02e3),
|
||||
MAKE_VIDPID(0x045e, 0x02ea),
|
||||
MAKE_VIDPID(0x045e, 0x02fd),
|
||||
MAKE_VIDPID(0x045e, 0x02ff),
|
||||
MAKE_VIDPID(0x045e, 0x0867),
|
||||
MAKE_VIDPID(0x045e, 0x0b00),
|
||||
MAKE_VIDPID(0x045e, 0x0b05),
|
||||
MAKE_VIDPID(0x045e, 0x0b0a),
|
||||
MAKE_VIDPID(0x045e, 0x0b0c),
|
||||
MAKE_VIDPID(0x045e, 0x0b20),
|
||||
MAKE_VIDPID(0x045e, 0x0b21),
|
||||
MAKE_VIDPID(0x045e, 0x0b22),
|
||||
MAKE_VIDPID(0x046d, 0x0000),
|
||||
MAKE_VIDPID(0x046d, 0x1004),
|
||||
MAKE_VIDPID(0x046d, 0x1007),
|
||||
MAKE_VIDPID(0x046d, 0x1008),
|
||||
MAKE_VIDPID(0x046d, 0xf301),
|
||||
MAKE_VIDPID(0x0738, 0x02a0),
|
||||
MAKE_VIDPID(0x0738, 0x4a01),
|
||||
MAKE_VIDPID(0x0738, 0x7263),
|
||||
MAKE_VIDPID(0x0738, 0xb738),
|
||||
MAKE_VIDPID(0x0738, 0xcb29),
|
||||
MAKE_VIDPID(0x0738, 0xf401),
|
||||
MAKE_VIDPID(0x0c12, 0x0e17),
|
||||
MAKE_VIDPID(0x0c12, 0x0e1c),
|
||||
MAKE_VIDPID(0x0c12, 0x0e22),
|
||||
MAKE_VIDPID(0x0c12, 0x0e30),
|
||||
MAKE_VIDPID(0x0d62, 0x9a1a),
|
||||
MAKE_VIDPID(0x0d62, 0x9a1b),
|
||||
MAKE_VIDPID(0x0e00, 0x0e00),
|
||||
MAKE_VIDPID(0x0e6f, 0x012a),
|
||||
MAKE_VIDPID(0x0e6f, 0x0139),
|
||||
MAKE_VIDPID(0x0e6f, 0x013B),
|
||||
MAKE_VIDPID(0x0e6f, 0x013a),
|
||||
MAKE_VIDPID(0x0e6f, 0x0145),
|
||||
MAKE_VIDPID(0x0e6f, 0x0146),
|
||||
MAKE_VIDPID(0x0e6f, 0x0152),
|
||||
MAKE_VIDPID(0x0e6f, 0x015b),
|
||||
MAKE_VIDPID(0x0e6f, 0x015c),
|
||||
MAKE_VIDPID(0x0e6f, 0x015d),
|
||||
MAKE_VIDPID(0x0e6f, 0x015f),
|
||||
MAKE_VIDPID(0x0e6f, 0x0160),
|
||||
MAKE_VIDPID(0x0e6f, 0x0161),
|
||||
MAKE_VIDPID(0x0e6f, 0x0162),
|
||||
MAKE_VIDPID(0x0e6f, 0x0163),
|
||||
MAKE_VIDPID(0x0e6f, 0x0164),
|
||||
MAKE_VIDPID(0x0e6f, 0x0165),
|
||||
MAKE_VIDPID(0x0e6f, 0x0166),
|
||||
MAKE_VIDPID(0x0e6f, 0x0167),
|
||||
MAKE_VIDPID(0x0e6f, 0x0205),
|
||||
MAKE_VIDPID(0x0e6f, 0x0206),
|
||||
MAKE_VIDPID(0x0e6f, 0x0246),
|
||||
MAKE_VIDPID(0x0e6f, 0x0261),
|
||||
MAKE_VIDPID(0x0e6f, 0x0262),
|
||||
MAKE_VIDPID(0x0e6f, 0x02a0),
|
||||
MAKE_VIDPID(0x0e6f, 0x02a1),
|
||||
MAKE_VIDPID(0x0e6f, 0x02a2),
|
||||
MAKE_VIDPID(0x0e6f, 0x02a3),
|
||||
MAKE_VIDPID(0x0e6f, 0x02a4),
|
||||
MAKE_VIDPID(0x0e6f, 0x02a5),
|
||||
MAKE_VIDPID(0x0e6f, 0x02a6),
|
||||
MAKE_VIDPID(0x0e6f, 0x02a7),
|
||||
MAKE_VIDPID(0x0e6f, 0x02a8),
|
||||
MAKE_VIDPID(0x0e6f, 0x02a9),
|
||||
MAKE_VIDPID(0x0e6f, 0x02aa),
|
||||
MAKE_VIDPID(0x0e6f, 0x02ab),
|
||||
MAKE_VIDPID(0x0e6f, 0x02ac),
|
||||
MAKE_VIDPID(0x0e6f, 0x02ad),
|
||||
MAKE_VIDPID(0x0e6f, 0x02ae),
|
||||
MAKE_VIDPID(0x0e6f, 0x02af),
|
||||
MAKE_VIDPID(0x0e6f, 0x02b0),
|
||||
MAKE_VIDPID(0x0e6f, 0x02b1),
|
||||
MAKE_VIDPID(0x0e6f, 0x02b2),
|
||||
MAKE_VIDPID(0x0e6f, 0x02b3),
|
||||
MAKE_VIDPID(0x0e6f, 0x02b5),
|
||||
MAKE_VIDPID(0x0e6f, 0x02b6),
|
||||
MAKE_VIDPID(0x0e6f, 0x02b8),
|
||||
MAKE_VIDPID(0x0e6f, 0x02bd),
|
||||
MAKE_VIDPID(0x0e6f, 0x02be),
|
||||
MAKE_VIDPID(0x0e6f, 0x02bf),
|
||||
MAKE_VIDPID(0x0e6f, 0x02c0),
|
||||
MAKE_VIDPID(0x0e6f, 0x02c1),
|
||||
MAKE_VIDPID(0x0e6f, 0x02c2),
|
||||
MAKE_VIDPID(0x0e6f, 0x02c3),
|
||||
MAKE_VIDPID(0x0e6f, 0x02c4),
|
||||
MAKE_VIDPID(0x0e6f, 0x02c5),
|
||||
MAKE_VIDPID(0x0e6f, 0x02c6),
|
||||
MAKE_VIDPID(0x0e6f, 0x02c7),
|
||||
MAKE_VIDPID(0x0e6f, 0x02c8),
|
||||
MAKE_VIDPID(0x0e6f, 0x02c9),
|
||||
MAKE_VIDPID(0x0e6f, 0x02ca),
|
||||
MAKE_VIDPID(0x0e6f, 0x02cb),
|
||||
MAKE_VIDPID(0x0e6f, 0x02cd),
|
||||
MAKE_VIDPID(0x0e6f, 0x02ce),
|
||||
MAKE_VIDPID(0x0e6f, 0x02cf),
|
||||
MAKE_VIDPID(0x0e6f, 0x02d5),
|
||||
MAKE_VIDPID(0x0e6f, 0x0346),
|
||||
MAKE_VIDPID(0x0e6f, 0x0446),
|
||||
MAKE_VIDPID(0x0e6f, 0xf501),
|
||||
MAKE_VIDPID(0x0f0d, 0x0063),
|
||||
MAKE_VIDPID(0x0f0d, 0x0067),
|
||||
MAKE_VIDPID(0x0f0d, 0x0078),
|
||||
MAKE_VIDPID(0x0f0d, 0x0097),
|
||||
MAKE_VIDPID(0x0f0d, 0x00ba),
|
||||
MAKE_VIDPID(0x0f0d, 0x00c0),
|
||||
MAKE_VIDPID(0x0f0d, 0x00c5),
|
||||
MAKE_VIDPID(0x0f0d, 0x00d8),
|
||||
MAKE_VIDPID(0x0f0d, 0x00ed),
|
||||
MAKE_VIDPID(0x0fff, 0x02a1),
|
||||
MAKE_VIDPID(0x12ab, 0x0304),
|
||||
MAKE_VIDPID(0x1430, 0x0291),
|
||||
MAKE_VIDPID(0x1430, 0x02a9),
|
||||
MAKE_VIDPID(0x1430, 0x070b),
|
||||
MAKE_VIDPID(0x1430, 0x0719),
|
||||
MAKE_VIDPID(0x146b, 0x0611),
|
||||
MAKE_VIDPID(0x1532, 0x0a00),
|
||||
MAKE_VIDPID(0x1532, 0x0a03),
|
||||
MAKE_VIDPID(0x1532, 0x0a14),
|
||||
MAKE_VIDPID(0x1532, 0x0a15),
|
||||
MAKE_VIDPID(0x16d0, 0x0f3f),
|
||||
MAKE_VIDPID(0x1bad, 0x028e),
|
||||
MAKE_VIDPID(0x1bad, 0x02a0),
|
||||
MAKE_VIDPID(0x1bad, 0x5500),
|
||||
MAKE_VIDPID(0x20ab, 0x55ef),
|
||||
MAKE_VIDPID(0x24c6, 0x541a),
|
||||
MAKE_VIDPID(0x24c6, 0x542a),
|
||||
MAKE_VIDPID(0x24c6, 0x543a),
|
||||
MAKE_VIDPID(0x24c6, 0x5509),
|
||||
MAKE_VIDPID(0x24c6, 0x551a),
|
||||
MAKE_VIDPID(0x24c6, 0x561a),
|
||||
MAKE_VIDPID(0x24c6, 0x581a),
|
||||
MAKE_VIDPID(0x24c6, 0x591a),
|
||||
MAKE_VIDPID(0x24c6, 0x592a),
|
||||
MAKE_VIDPID(0x24c6, 0x791a),
|
||||
MAKE_VIDPID(0x2516, 0x0069),
|
||||
MAKE_VIDPID(0x25b1, 0x0360),
|
||||
MAKE_VIDPID(0x2c22, 0x2203),
|
||||
MAKE_VIDPID(0x2e24, 0x0652),
|
||||
MAKE_VIDPID(0x2e24, 0x1618),
|
||||
MAKE_VIDPID(0x2e24, 0x1688),
|
||||
MAKE_VIDPID(0x2f24, 0x0011),
|
||||
MAKE_VIDPID(0x2f24, 0x002e),
|
||||
MAKE_VIDPID(0x2f24, 0x0050),
|
||||
MAKE_VIDPID(0x2f24, 0x0053),
|
||||
MAKE_VIDPID(0x2f24, 0x008f),
|
||||
MAKE_VIDPID(0x2f24, 0x0091),
|
||||
MAKE_VIDPID(0x2f24, 0x00b7),
|
||||
MAKE_VIDPID(0xd2d2, 0xd2d2),
|
||||
};
|
||||
|
||||
EControllerType GuessControllerType( int nVID, int nPID )
|
||||
{
|
||||
if (vendor_id == USB_VENDOR_MICROSOFT) {
|
||||
if (product_id == USB_PRODUCT_XBOX_ONE_ELITE_SERIES_1 ||
|
||||
product_id == USB_PRODUCT_XBOX_ONE_ELITE_SERIES_2 ||
|
||||
product_id == USB_PRODUCT_XBOX_ONE_ELITE_SERIES_2_BLUETOOTH ||
|
||||
product_id == USB_PRODUCT_XBOX_ONE_ELITE_SERIES_2_BLE) {
|
||||
return SDL_TRUE;
|
||||
unsigned int unDeviceID = MAKE_CONTROLLER_ID( nVID, nPID );
|
||||
int iIndex;
|
||||
|
||||
for ( iIndex = 0; iIndex < sizeof( arrControllers ) / sizeof( arrControllers[0] ); ++iIndex )
|
||||
{
|
||||
if ( unDeviceID == arrControllers[ iIndex ].m_unDeviceID )
|
||||
{
|
||||
return arrControllers[ iIndex ].m_eControllerType;
|
||||
}
|
||||
}
|
||||
return SDL_FALSE;
|
||||
|
||||
return k_eControllerType_UnknownNonSteamController;
|
||||
}
|
||||
|
||||
SDL_bool SDL_IsJoystickXboxSeriesX(Uint16 vendor_id, Uint16 product_id)
|
||||
bool SDL_IsJoystickXboxOne(Uint16 vendor_id, Uint16 product_id)
|
||||
{
|
||||
if (vendor_id == USB_VENDOR_MICROSOFT) {
|
||||
if (product_id == USB_PRODUCT_XBOX_SERIES_X ||
|
||||
product_id == USB_PRODUCT_XBOX_SERIES_X_BLE) {
|
||||
return SDL_TRUE;
|
||||
}
|
||||
}
|
||||
if (vendor_id == USB_VENDOR_PDP) {
|
||||
if (product_id == USB_PRODUCT_XBOX_SERIES_X_VICTRIX_GAMBIT ||
|
||||
product_id == USB_PRODUCT_XBOX_SERIES_X_PDP_BLUE ||
|
||||
product_id == USB_PRODUCT_XBOX_SERIES_X_PDP_AFTERGLOW) {
|
||||
return SDL_TRUE;
|
||||
}
|
||||
}
|
||||
if (vendor_id == USB_VENDOR_POWERA_ALT) {
|
||||
if ((product_id >= 0x2001 && product_id <= 0x201a) ||
|
||||
product_id == USB_PRODUCT_XBOX_SERIES_X_POWERA_FUSION_PRO2 ||
|
||||
product_id == USB_PRODUCT_XBOX_SERIES_X_POWERA_MOGA_XP_ULTRA ||
|
||||
product_id == USB_PRODUCT_XBOX_SERIES_X_POWERA_SPECTRA) {
|
||||
return SDL_TRUE;
|
||||
}
|
||||
}
|
||||
if (vendor_id == USB_VENDOR_HORI) {
|
||||
if (product_id == USB_PRODUCT_HORI_FIGHTING_COMMANDER_OCTA_SERIES_X ||
|
||||
product_id == USB_PRODUCT_HORI_HORIPAD_PRO_SERIES_X) {
|
||||
return SDL_TRUE;
|
||||
}
|
||||
}
|
||||
if (vendor_id == USB_VENDOR_RAZER) {
|
||||
if (product_id == USB_PRODUCT_RAZER_WOLVERINE_V2 ||
|
||||
product_id == USB_PRODUCT_RAZER_WOLVERINE_V2_CHROMA) {
|
||||
return SDL_TRUE;
|
||||
}
|
||||
}
|
||||
if (vendor_id == USB_VENDOR_THRUSTMASTER) {
|
||||
if (product_id == USB_PRODUCT_THRUSTMASTER_ESWAPX_PRO) {
|
||||
return SDL_TRUE;
|
||||
}
|
||||
}
|
||||
if (vendor_id == USB_VENDOR_TURTLE_BEACH) {
|
||||
if (product_id == USB_PRODUCT_TURTLE_BEACH_SERIES_X_REACT_R ||
|
||||
product_id == USB_PRODUCT_TURTLE_BEACH_SERIES_X_RECON) {
|
||||
return SDL_TRUE;
|
||||
}
|
||||
}
|
||||
if (vendor_id == USB_VENDOR_8BITDO) {
|
||||
if (product_id == USB_PRODUCT_8BITDO_XBOX_CONTROLLER) {
|
||||
return SDL_TRUE;
|
||||
}
|
||||
}
|
||||
if (vendor_id == USB_VENDOR_GAMESIR) {
|
||||
if (product_id == USB_PRODUCT_GAMESIR_G7) {
|
||||
return SDL_TRUE;
|
||||
}
|
||||
}
|
||||
return SDL_FALSE;
|
||||
EControllerType eType = GuessControllerType(vendor_id, product_id);
|
||||
return eType == k_eControllerType_XBoxOneController ||
|
||||
eType == k_eControllerType_XBoxEliteController;
|
||||
}
|
||||
|
||||
SDL_bool SDL_IsJoystickDualSenseEdge(Uint16 vendor_id, Uint16 product_id)
|
||||
bool SDL_IsJoystickXboxOneElite(Uint16 vendor_id, Uint16 product_id)
|
||||
{
|
||||
if (vendor_id == USB_VENDOR_SONY) {
|
||||
if (product_id == USB_PRODUCT_SONY_DS5_EDGE) {
|
||||
return SDL_TRUE;
|
||||
EControllerType eType = GuessControllerType(vendor_id, product_id);
|
||||
return eType == k_eControllerType_XBoxEliteController;
|
||||
}
|
||||
|
||||
bool SDL_IsJoystickXboxSeriesX(Uint16 vendor_id, Uint16 product_id)
|
||||
{
|
||||
if (!SDL_IsJoystickXboxOne(vendor_id, product_id)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Most new controllers have the share button, so we'll default to true and
|
||||
// have a list of older XBox One controllers that are known not to have it.
|
||||
Uint32 vidpid = MAKE_VIDPID(vendor_id, product_id);
|
||||
for (int i = 0; i < (sizeof(initial_old_xboxone_controllers) / sizeof(*initial_old_xboxone_controllers)); i++) {
|
||||
if (vidpid == initial_old_xboxone_controllers[i]) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return SDL_FALSE;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SDL_IsJoystickDualSenseEdge(Uint16 vendor_id, Uint16 product_id)
|
||||
{
|
||||
EControllerType eType = GuessControllerType(vendor_id, product_id);
|
||||
return eType == k_eControllerType_PS5EdgeController;
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
typedef int SDL_bool;
|
||||
#define SDL_TRUE 1
|
||||
#define SDL_FALSE 0
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
typedef unsigned short Uint16;
|
||||
typedef uint16_t Uint16;
|
||||
typedef uint32_t Uint32;
|
||||
|
||||
SDL_bool SDL_IsJoystickXboxOneElite(Uint16 vendor_id, Uint16 product_id);
|
||||
SDL_bool SDL_IsJoystickXboxSeriesX(Uint16 vendor_id, Uint16 product_id);
|
||||
SDL_bool SDL_IsJoystickDualSenseEdge(Uint16 vendor_id, Uint16 product_id);
|
||||
bool SDL_IsJoystickXboxOneElite(Uint16 vendor_id, Uint16 product_id);
|
||||
bool SDL_IsJoystickXboxSeriesX(Uint16 vendor_id, Uint16 product_id);
|
||||
bool SDL_IsJoystickDualSenseEdge(Uint16 vendor_id, Uint16 product_id);
|
||||
Submodule app/src/main/jni/moonlight-core/moonlight-common-c updated: c86f49ee7f...874ac9548f
@@ -1,11 +1,5 @@
|
||||
LOCAL_PATH:= $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE:= libssl
|
||||
LOCAL_SRC_FILES:= $(TARGET_ARCH_ABI)/libssl.a
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
|
||||
include $(PREBUILT_STATIC_LIBRARY)
|
||||
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE:= libcrypto
|
||||
LOCAL_SRC_FILES:= $(TARGET_ARCH_ABI)/libcrypto.a
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (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
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (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
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
|
||||
@@ -1,92 +1,109 @@
|
||||
/*
|
||||
* Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 2002-2026 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (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
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#ifndef HEADER_AES_H
|
||||
# define HEADER_AES_H
|
||||
#ifndef OPENSSL_AES_H
|
||||
#define OPENSSL_AES_H
|
||||
#pragma once
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
#include <openssl/macros.h>
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#define HEADER_AES_H
|
||||
#endif
|
||||
|
||||
# include <stddef.h>
|
||||
# ifdef __cplusplus
|
||||
#include <openssl/opensslconf.h>
|
||||
|
||||
#include <stddef.h>
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# define AES_ENCRYPT 1
|
||||
# define AES_DECRYPT 0
|
||||
#define AES_BLOCK_SIZE 16
|
||||
|
||||
/*
|
||||
* Because array size can't be a const in C, the following two are macros.
|
||||
* Both sizes are in bytes.
|
||||
*/
|
||||
# define AES_MAXNR 14
|
||||
# define AES_BLOCK_SIZE 16
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
|
||||
#define AES_ENCRYPT 1
|
||||
#define AES_DECRYPT 0
|
||||
|
||||
#define AES_MAXNR 14
|
||||
|
||||
/* This should be a hidden type, but EVP requires that the size be known */
|
||||
struct aes_key_st {
|
||||
# ifdef AES_LONG
|
||||
#ifdef AES_LONG
|
||||
unsigned long rd_key[4 * (AES_MAXNR + 1)];
|
||||
# else
|
||||
#else
|
||||
unsigned int rd_key[4 * (AES_MAXNR + 1)];
|
||||
# endif
|
||||
#endif
|
||||
int rounds;
|
||||
};
|
||||
typedef struct aes_key_st AES_KEY;
|
||||
|
||||
const char *AES_options(void);
|
||||
|
||||
int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
|
||||
AES_KEY *key);
|
||||
int AES_set_decrypt_key(const unsigned char *userKey, const int bits,
|
||||
AES_KEY *key);
|
||||
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
OSSL_DEPRECATEDIN_3_0 const char *AES_options(void);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
int AES_set_encrypt_key(const unsigned char *userKey, int bits,
|
||||
AES_KEY *key);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
int AES_set_decrypt_key(const unsigned char *userKey, int bits,
|
||||
AES_KEY *key);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
void AES_encrypt(const unsigned char *in, unsigned char *out,
|
||||
const AES_KEY *key);
|
||||
const AES_KEY *key);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
void AES_decrypt(const unsigned char *in, unsigned char *out,
|
||||
const AES_KEY *key);
|
||||
|
||||
const AES_KEY *key);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
void AES_ecb_encrypt(const unsigned char *in, unsigned char *out,
|
||||
const AES_KEY *key, const int enc);
|
||||
const AES_KEY *key, int enc);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
|
||||
size_t length, const AES_KEY *key,
|
||||
unsigned char *ivec, const int enc);
|
||||
size_t length, const AES_KEY *key,
|
||||
unsigned char *ivec, int enc);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
void AES_cfb128_encrypt(const unsigned char *in, unsigned char *out,
|
||||
size_t length, const AES_KEY *key,
|
||||
unsigned char *ivec, int *num, const int enc);
|
||||
size_t length, const AES_KEY *key,
|
||||
unsigned char *ivec, int *num, int enc);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
void AES_cfb1_encrypt(const unsigned char *in, unsigned char *out,
|
||||
size_t length, const AES_KEY *key,
|
||||
unsigned char *ivec, int *num, const int enc);
|
||||
size_t length, const AES_KEY *key,
|
||||
unsigned char *ivec, int *num, int enc);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
void AES_cfb8_encrypt(const unsigned char *in, unsigned char *out,
|
||||
size_t length, const AES_KEY *key,
|
||||
unsigned char *ivec, int *num, const int enc);
|
||||
size_t length, const AES_KEY *key,
|
||||
unsigned char *ivec, int *num, int enc);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
void AES_ofb128_encrypt(const unsigned char *in, unsigned char *out,
|
||||
size_t length, const AES_KEY *key,
|
||||
unsigned char *ivec, int *num);
|
||||
size_t length, const AES_KEY *key,
|
||||
unsigned char *ivec, int *num);
|
||||
|
||||
/* NB: the IV is _two_ blocks long */
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
void AES_ige_encrypt(const unsigned char *in, unsigned char *out,
|
||||
size_t length, const AES_KEY *key,
|
||||
unsigned char *ivec, const int enc);
|
||||
size_t length, const AES_KEY *key,
|
||||
unsigned char *ivec, int enc);
|
||||
/* NB: the IV is _four_ blocks long */
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
void AES_bi_ige_encrypt(const unsigned char *in, unsigned char *out,
|
||||
size_t length, const AES_KEY *key,
|
||||
const AES_KEY *key2, const unsigned char *ivec,
|
||||
const int enc);
|
||||
|
||||
size_t length, const AES_KEY *key, const AES_KEY *key2,
|
||||
const unsigned char *ivec, int enc);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
int AES_wrap_key(AES_KEY *key, const unsigned char *iv,
|
||||
unsigned char *out,
|
||||
const unsigned char *in, unsigned int inlen);
|
||||
unsigned char *out, const unsigned char *in,
|
||||
unsigned int inlen);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
int AES_unwrap_key(AES_KEY *key, const unsigned char *iv,
|
||||
unsigned char *out,
|
||||
const unsigned char *in, unsigned int inlen);
|
||||
unsigned char *out, const unsigned char *in,
|
||||
unsigned int inlen);
|
||||
#endif
|
||||
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,10 +0,0 @@
|
||||
/*
|
||||
* Copyright 2015-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
|
||||
*/
|
||||
|
||||
#error "This file is obsolete; please update your software."
|
||||
@@ -1,256 +1,140 @@
|
||||
/*
|
||||
* Generated by util/mkerr.pl DO NOT EDIT
|
||||
* Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 1995-2024 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (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
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#ifndef HEADER_ASN1ERR_H
|
||||
# define HEADER_ASN1ERR_H
|
||||
#ifndef OPENSSL_ASN1ERR_H
|
||||
#define OPENSSL_ASN1ERR_H
|
||||
#pragma once
|
||||
|
||||
# include <openssl/symhacks.h>
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C"
|
||||
# endif
|
||||
int ERR_load_ASN1_strings(void);
|
||||
|
||||
/*
|
||||
* ASN1 function codes.
|
||||
*/
|
||||
# define ASN1_F_A2D_ASN1_OBJECT 100
|
||||
# define ASN1_F_A2I_ASN1_INTEGER 102
|
||||
# define ASN1_F_A2I_ASN1_STRING 103
|
||||
# define ASN1_F_APPEND_EXP 176
|
||||
# define ASN1_F_ASN1_BIO_INIT 113
|
||||
# define ASN1_F_ASN1_BIT_STRING_SET_BIT 183
|
||||
# define ASN1_F_ASN1_CB 177
|
||||
# define ASN1_F_ASN1_CHECK_TLEN 104
|
||||
# define ASN1_F_ASN1_COLLECT 106
|
||||
# define ASN1_F_ASN1_D2I_EX_PRIMITIVE 108
|
||||
# define ASN1_F_ASN1_D2I_FP 109
|
||||
# define ASN1_F_ASN1_D2I_READ_BIO 107
|
||||
# define ASN1_F_ASN1_DIGEST 184
|
||||
# define ASN1_F_ASN1_DO_ADB 110
|
||||
# define ASN1_F_ASN1_DO_LOCK 233
|
||||
# define ASN1_F_ASN1_DUP 111
|
||||
# define ASN1_F_ASN1_ENC_SAVE 115
|
||||
# define ASN1_F_ASN1_EX_C2I 204
|
||||
# define ASN1_F_ASN1_FIND_END 190
|
||||
# define ASN1_F_ASN1_GENERALIZEDTIME_ADJ 216
|
||||
# define ASN1_F_ASN1_GENERATE_V3 178
|
||||
# define ASN1_F_ASN1_GET_INT64 224
|
||||
# define ASN1_F_ASN1_GET_OBJECT 114
|
||||
# define ASN1_F_ASN1_GET_UINT64 225
|
||||
# define ASN1_F_ASN1_I2D_BIO 116
|
||||
# define ASN1_F_ASN1_I2D_FP 117
|
||||
# define ASN1_F_ASN1_ITEM_D2I_FP 206
|
||||
# define ASN1_F_ASN1_ITEM_DUP 191
|
||||
# define ASN1_F_ASN1_ITEM_EMBED_D2I 120
|
||||
# define ASN1_F_ASN1_ITEM_EMBED_NEW 121
|
||||
# define ASN1_F_ASN1_ITEM_EX_I2D 144
|
||||
# define ASN1_F_ASN1_ITEM_FLAGS_I2D 118
|
||||
# define ASN1_F_ASN1_ITEM_I2D_BIO 192
|
||||
# define ASN1_F_ASN1_ITEM_I2D_FP 193
|
||||
# define ASN1_F_ASN1_ITEM_PACK 198
|
||||
# define ASN1_F_ASN1_ITEM_SIGN 195
|
||||
# define ASN1_F_ASN1_ITEM_SIGN_CTX 220
|
||||
# define ASN1_F_ASN1_ITEM_UNPACK 199
|
||||
# define ASN1_F_ASN1_ITEM_VERIFY 197
|
||||
# define ASN1_F_ASN1_MBSTRING_NCOPY 122
|
||||
# define ASN1_F_ASN1_OBJECT_NEW 123
|
||||
# define ASN1_F_ASN1_OUTPUT_DATA 214
|
||||
# define ASN1_F_ASN1_PCTX_NEW 205
|
||||
# define ASN1_F_ASN1_PRIMITIVE_NEW 119
|
||||
# define ASN1_F_ASN1_SCTX_NEW 221
|
||||
# define ASN1_F_ASN1_SIGN 128
|
||||
# define ASN1_F_ASN1_STR2TYPE 179
|
||||
# define ASN1_F_ASN1_STRING_GET_INT64 227
|
||||
# define ASN1_F_ASN1_STRING_GET_UINT64 230
|
||||
# define ASN1_F_ASN1_STRING_SET 186
|
||||
# define ASN1_F_ASN1_STRING_TABLE_ADD 129
|
||||
# define ASN1_F_ASN1_STRING_TO_BN 228
|
||||
# define ASN1_F_ASN1_STRING_TYPE_NEW 130
|
||||
# define ASN1_F_ASN1_TEMPLATE_EX_D2I 132
|
||||
# define ASN1_F_ASN1_TEMPLATE_NEW 133
|
||||
# define ASN1_F_ASN1_TEMPLATE_NOEXP_D2I 131
|
||||
# define ASN1_F_ASN1_TIME_ADJ 217
|
||||
# define ASN1_F_ASN1_TYPE_GET_INT_OCTETSTRING 134
|
||||
# define ASN1_F_ASN1_TYPE_GET_OCTETSTRING 135
|
||||
# define ASN1_F_ASN1_UTCTIME_ADJ 218
|
||||
# define ASN1_F_ASN1_VERIFY 137
|
||||
# define ASN1_F_B64_READ_ASN1 209
|
||||
# define ASN1_F_B64_WRITE_ASN1 210
|
||||
# define ASN1_F_BIO_NEW_NDEF 208
|
||||
# define ASN1_F_BITSTR_CB 180
|
||||
# define ASN1_F_BN_TO_ASN1_STRING 229
|
||||
# define ASN1_F_C2I_ASN1_BIT_STRING 189
|
||||
# define ASN1_F_C2I_ASN1_INTEGER 194
|
||||
# define ASN1_F_C2I_ASN1_OBJECT 196
|
||||
# define ASN1_F_C2I_IBUF 226
|
||||
# define ASN1_F_C2I_UINT64_INT 101
|
||||
# define ASN1_F_COLLECT_DATA 140
|
||||
# define ASN1_F_D2I_ASN1_OBJECT 147
|
||||
# define ASN1_F_D2I_ASN1_UINTEGER 150
|
||||
# define ASN1_F_D2I_AUTOPRIVATEKEY 207
|
||||
# define ASN1_F_D2I_PRIVATEKEY 154
|
||||
# define ASN1_F_D2I_PUBLICKEY 155
|
||||
# define ASN1_F_DO_BUF 142
|
||||
# define ASN1_F_DO_CREATE 124
|
||||
# define ASN1_F_DO_DUMP 125
|
||||
# define ASN1_F_DO_TCREATE 222
|
||||
# define ASN1_F_I2A_ASN1_OBJECT 126
|
||||
# define ASN1_F_I2D_ASN1_BIO_STREAM 211
|
||||
# define ASN1_F_I2D_ASN1_OBJECT 143
|
||||
# define ASN1_F_I2D_DSA_PUBKEY 161
|
||||
# define ASN1_F_I2D_EC_PUBKEY 181
|
||||
# define ASN1_F_I2D_PRIVATEKEY 163
|
||||
# define ASN1_F_I2D_PUBLICKEY 164
|
||||
# define ASN1_F_I2D_RSA_PUBKEY 165
|
||||
# define ASN1_F_LONG_C2I 166
|
||||
# define ASN1_F_NDEF_PREFIX 127
|
||||
# define ASN1_F_NDEF_SUFFIX 136
|
||||
# define ASN1_F_OID_MODULE_INIT 174
|
||||
# define ASN1_F_PARSE_TAGGING 182
|
||||
# define ASN1_F_PKCS5_PBE2_SET_IV 167
|
||||
# define ASN1_F_PKCS5_PBE2_SET_SCRYPT 231
|
||||
# define ASN1_F_PKCS5_PBE_SET 202
|
||||
# define ASN1_F_PKCS5_PBE_SET0_ALGOR 215
|
||||
# define ASN1_F_PKCS5_PBKDF2_SET 219
|
||||
# define ASN1_F_PKCS5_SCRYPT_SET 232
|
||||
# define ASN1_F_SMIME_READ_ASN1 212
|
||||
# define ASN1_F_SMIME_TEXT 213
|
||||
# define ASN1_F_STABLE_GET 138
|
||||
# define ASN1_F_STBL_MODULE_INIT 223
|
||||
# define ASN1_F_UINT32_C2I 105
|
||||
# define ASN1_F_UINT32_NEW 139
|
||||
# define ASN1_F_UINT64_C2I 112
|
||||
# define ASN1_F_UINT64_NEW 141
|
||||
# define ASN1_F_X509_CRL_ADD0_REVOKED 169
|
||||
# define ASN1_F_X509_INFO_NEW 170
|
||||
# define ASN1_F_X509_NAME_ENCODE 203
|
||||
# define ASN1_F_X509_NAME_EX_D2I 158
|
||||
# define ASN1_F_X509_NAME_EX_NEW 171
|
||||
# define ASN1_F_X509_PKEY_NEW 173
|
||||
#include <openssl/opensslconf.h>
|
||||
#include <openssl/symhacks.h>
|
||||
#include <openssl/cryptoerr_legacy.h>
|
||||
|
||||
/*
|
||||
* ASN1 reason codes.
|
||||
*/
|
||||
# define ASN1_R_ADDING_OBJECT 171
|
||||
# define ASN1_R_ASN1_PARSE_ERROR 203
|
||||
# define ASN1_R_ASN1_SIG_PARSE_ERROR 204
|
||||
# define ASN1_R_AUX_ERROR 100
|
||||
# define ASN1_R_BAD_OBJECT_HEADER 102
|
||||
# define ASN1_R_BAD_TEMPLATE 230
|
||||
# define ASN1_R_BMPSTRING_IS_WRONG_LENGTH 214
|
||||
# define ASN1_R_BN_LIB 105
|
||||
# define ASN1_R_BOOLEAN_IS_WRONG_LENGTH 106
|
||||
# define ASN1_R_BUFFER_TOO_SMALL 107
|
||||
# define ASN1_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER 108
|
||||
# define ASN1_R_CONTEXT_NOT_INITIALISED 217
|
||||
# define ASN1_R_DATA_IS_WRONG 109
|
||||
# define ASN1_R_DECODE_ERROR 110
|
||||
# define ASN1_R_DEPTH_EXCEEDED 174
|
||||
# define ASN1_R_DIGEST_AND_KEY_TYPE_NOT_SUPPORTED 198
|
||||
# define ASN1_R_ENCODE_ERROR 112
|
||||
# define ASN1_R_ERROR_GETTING_TIME 173
|
||||
# define ASN1_R_ERROR_LOADING_SECTION 172
|
||||
# define ASN1_R_ERROR_SETTING_CIPHER_PARAMS 114
|
||||
# define ASN1_R_EXPECTING_AN_INTEGER 115
|
||||
# define ASN1_R_EXPECTING_AN_OBJECT 116
|
||||
# define ASN1_R_EXPLICIT_LENGTH_MISMATCH 119
|
||||
# define ASN1_R_EXPLICIT_TAG_NOT_CONSTRUCTED 120
|
||||
# define ASN1_R_FIELD_MISSING 121
|
||||
# define ASN1_R_FIRST_NUM_TOO_LARGE 122
|
||||
# define ASN1_R_HEADER_TOO_LONG 123
|
||||
# define ASN1_R_ILLEGAL_BITSTRING_FORMAT 175
|
||||
# define ASN1_R_ILLEGAL_BOOLEAN 176
|
||||
# define ASN1_R_ILLEGAL_CHARACTERS 124
|
||||
# define ASN1_R_ILLEGAL_FORMAT 177
|
||||
# define ASN1_R_ILLEGAL_HEX 178
|
||||
# define ASN1_R_ILLEGAL_IMPLICIT_TAG 179
|
||||
# define ASN1_R_ILLEGAL_INTEGER 180
|
||||
# define ASN1_R_ILLEGAL_NEGATIVE_VALUE 226
|
||||
# define ASN1_R_ILLEGAL_NESTED_TAGGING 181
|
||||
# define ASN1_R_ILLEGAL_NULL 125
|
||||
# define ASN1_R_ILLEGAL_NULL_VALUE 182
|
||||
# define ASN1_R_ILLEGAL_OBJECT 183
|
||||
# define ASN1_R_ILLEGAL_OPTIONAL_ANY 126
|
||||
# define ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE 170
|
||||
# define ASN1_R_ILLEGAL_PADDING 221
|
||||
# define ASN1_R_ILLEGAL_TAGGED_ANY 127
|
||||
# define ASN1_R_ILLEGAL_TIME_VALUE 184
|
||||
# define ASN1_R_ILLEGAL_ZERO_CONTENT 222
|
||||
# define ASN1_R_INTEGER_NOT_ASCII_FORMAT 185
|
||||
# define ASN1_R_INTEGER_TOO_LARGE_FOR_LONG 128
|
||||
# define ASN1_R_INVALID_BIT_STRING_BITS_LEFT 220
|
||||
# define ASN1_R_INVALID_BMPSTRING_LENGTH 129
|
||||
# define ASN1_R_INVALID_DIGIT 130
|
||||
# define ASN1_R_INVALID_MIME_TYPE 205
|
||||
# define ASN1_R_INVALID_MODIFIER 186
|
||||
# define ASN1_R_INVALID_NUMBER 187
|
||||
# define ASN1_R_INVALID_OBJECT_ENCODING 216
|
||||
# define ASN1_R_INVALID_SCRYPT_PARAMETERS 227
|
||||
# define ASN1_R_INVALID_SEPARATOR 131
|
||||
# define ASN1_R_INVALID_STRING_TABLE_VALUE 218
|
||||
# define ASN1_R_INVALID_UNIVERSALSTRING_LENGTH 133
|
||||
# define ASN1_R_INVALID_UTF8STRING 134
|
||||
# define ASN1_R_INVALID_VALUE 219
|
||||
# define ASN1_R_LIST_ERROR 188
|
||||
# define ASN1_R_MIME_NO_CONTENT_TYPE 206
|
||||
# define ASN1_R_MIME_PARSE_ERROR 207
|
||||
# define ASN1_R_MIME_SIG_PARSE_ERROR 208
|
||||
# define ASN1_R_MISSING_EOC 137
|
||||
# define ASN1_R_MISSING_SECOND_NUMBER 138
|
||||
# define ASN1_R_MISSING_VALUE 189
|
||||
# define ASN1_R_MSTRING_NOT_UNIVERSAL 139
|
||||
# define ASN1_R_MSTRING_WRONG_TAG 140
|
||||
# define ASN1_R_NESTED_ASN1_STRING 197
|
||||
# define ASN1_R_NESTED_TOO_DEEP 201
|
||||
# define ASN1_R_NON_HEX_CHARACTERS 141
|
||||
# define ASN1_R_NOT_ASCII_FORMAT 190
|
||||
# define ASN1_R_NOT_ENOUGH_DATA 142
|
||||
# define ASN1_R_NO_CONTENT_TYPE 209
|
||||
# define ASN1_R_NO_MATCHING_CHOICE_TYPE 143
|
||||
# define ASN1_R_NO_MULTIPART_BODY_FAILURE 210
|
||||
# define ASN1_R_NO_MULTIPART_BOUNDARY 211
|
||||
# define ASN1_R_NO_SIG_CONTENT_TYPE 212
|
||||
# define ASN1_R_NULL_IS_WRONG_LENGTH 144
|
||||
# define ASN1_R_OBJECT_NOT_ASCII_FORMAT 191
|
||||
# define ASN1_R_ODD_NUMBER_OF_CHARS 145
|
||||
# define ASN1_R_SECOND_NUMBER_TOO_LARGE 147
|
||||
# define ASN1_R_SEQUENCE_LENGTH_MISMATCH 148
|
||||
# define ASN1_R_SEQUENCE_NOT_CONSTRUCTED 149
|
||||
# define ASN1_R_SEQUENCE_OR_SET_NEEDS_CONFIG 192
|
||||
# define ASN1_R_SHORT_LINE 150
|
||||
# define ASN1_R_SIG_INVALID_MIME_TYPE 213
|
||||
# define ASN1_R_STREAMING_NOT_SUPPORTED 202
|
||||
# define ASN1_R_STRING_TOO_LONG 151
|
||||
# define ASN1_R_STRING_TOO_SHORT 152
|
||||
# define ASN1_R_THE_ASN1_OBJECT_IDENTIFIER_IS_NOT_KNOWN_FOR_THIS_MD 154
|
||||
# define ASN1_R_TIME_NOT_ASCII_FORMAT 193
|
||||
# define ASN1_R_TOO_LARGE 223
|
||||
# define ASN1_R_TOO_LONG 155
|
||||
# define ASN1_R_TOO_SMALL 224
|
||||
# define ASN1_R_TYPE_NOT_CONSTRUCTED 156
|
||||
# define ASN1_R_TYPE_NOT_PRIMITIVE 195
|
||||
# define ASN1_R_UNEXPECTED_EOC 159
|
||||
# define ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH 215
|
||||
# define ASN1_R_UNKNOWN_FORMAT 160
|
||||
# define ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM 161
|
||||
# define ASN1_R_UNKNOWN_OBJECT_TYPE 162
|
||||
# define ASN1_R_UNKNOWN_PUBLIC_KEY_TYPE 163
|
||||
# define ASN1_R_UNKNOWN_SIGNATURE_ALGORITHM 199
|
||||
# define ASN1_R_UNKNOWN_TAG 194
|
||||
# define ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE 164
|
||||
# define ASN1_R_UNSUPPORTED_CIPHER 228
|
||||
# define ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE 167
|
||||
# define ASN1_R_UNSUPPORTED_TYPE 196
|
||||
# define ASN1_R_WRONG_INTEGER_TYPE 225
|
||||
# define ASN1_R_WRONG_PUBLIC_KEY_TYPE 200
|
||||
# define ASN1_R_WRONG_TAG 168
|
||||
#define ASN1_R_ADDING_OBJECT 171
|
||||
#define ASN1_R_ASN1_PARSE_ERROR 203
|
||||
#define ASN1_R_ASN1_SIG_PARSE_ERROR 204
|
||||
#define ASN1_R_AUX_ERROR 100
|
||||
#define ASN1_R_BAD_OBJECT_HEADER 102
|
||||
#define ASN1_R_BAD_TEMPLATE 230
|
||||
#define ASN1_R_BMPSTRING_IS_WRONG_LENGTH 214
|
||||
#define ASN1_R_BN_LIB 105
|
||||
#define ASN1_R_BOOLEAN_IS_WRONG_LENGTH 106
|
||||
#define ASN1_R_BUFFER_TOO_SMALL 107
|
||||
#define ASN1_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER 108
|
||||
#define ASN1_R_CONTEXT_NOT_INITIALISED 217
|
||||
#define ASN1_R_DATA_IS_WRONG 109
|
||||
#define ASN1_R_DECODE_ERROR 110
|
||||
#define ASN1_R_DEPTH_EXCEEDED 174
|
||||
#define ASN1_R_DIGEST_AND_KEY_TYPE_NOT_SUPPORTED 198
|
||||
#define ASN1_R_ENCODE_ERROR 112
|
||||
#define ASN1_R_ERROR_GETTING_TIME 173
|
||||
#define ASN1_R_ERROR_LOADING_SECTION 172
|
||||
#define ASN1_R_ERROR_SETTING_CIPHER_PARAMS 114
|
||||
#define ASN1_R_EXPECTING_AN_INTEGER 115
|
||||
#define ASN1_R_EXPECTING_AN_OBJECT 116
|
||||
#define ASN1_R_EXPLICIT_LENGTH_MISMATCH 119
|
||||
#define ASN1_R_EXPLICIT_TAG_NOT_CONSTRUCTED 120
|
||||
#define ASN1_R_FIELD_MISSING 121
|
||||
#define ASN1_R_FIRST_NUM_TOO_LARGE 122
|
||||
#define ASN1_R_GENERALIZEDTIME_IS_TOO_SHORT 232
|
||||
#define ASN1_R_HEADER_TOO_LONG 123
|
||||
#define ASN1_R_ILLEGAL_BITSTRING_FORMAT 175
|
||||
#define ASN1_R_ILLEGAL_BOOLEAN 176
|
||||
#define ASN1_R_ILLEGAL_CHARACTERS 124
|
||||
#define ASN1_R_ILLEGAL_FORMAT 177
|
||||
#define ASN1_R_ILLEGAL_HEX 178
|
||||
#define ASN1_R_ILLEGAL_IMPLICIT_TAG 179
|
||||
#define ASN1_R_ILLEGAL_INTEGER 180
|
||||
#define ASN1_R_ILLEGAL_NEGATIVE_VALUE 226
|
||||
#define ASN1_R_ILLEGAL_NESTED_TAGGING 181
|
||||
#define ASN1_R_ILLEGAL_NULL 125
|
||||
#define ASN1_R_ILLEGAL_NULL_VALUE 182
|
||||
#define ASN1_R_ILLEGAL_OBJECT 183
|
||||
#define ASN1_R_ILLEGAL_OPTIONAL_ANY 126
|
||||
#define ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE 170
|
||||
#define ASN1_R_ILLEGAL_PADDING 221
|
||||
#define ASN1_R_ILLEGAL_TAGGED_ANY 127
|
||||
#define ASN1_R_ILLEGAL_TIME_VALUE 184
|
||||
#define ASN1_R_ILLEGAL_ZERO_CONTENT 222
|
||||
#define ASN1_R_INTEGER_NOT_ASCII_FORMAT 185
|
||||
#define ASN1_R_INTEGER_TOO_LARGE_FOR_LONG 128
|
||||
#define ASN1_R_INVALID_BIT_STRING_BITS_LEFT 220
|
||||
#define ASN1_R_INVALID_BMPSTRING_LENGTH 129
|
||||
#define ASN1_R_INVALID_DIGIT 130
|
||||
#define ASN1_R_INVALID_MIME_TYPE 205
|
||||
#define ASN1_R_INVALID_MODIFIER 186
|
||||
#define ASN1_R_INVALID_NUMBER 187
|
||||
#define ASN1_R_INVALID_OBJECT_ENCODING 216
|
||||
#define ASN1_R_INVALID_SCRYPT_PARAMETERS 227
|
||||
#define ASN1_R_INVALID_SEPARATOR 131
|
||||
#define ASN1_R_INVALID_STRING_TABLE_VALUE 218
|
||||
#define ASN1_R_INVALID_UNIVERSALSTRING_LENGTH 133
|
||||
#define ASN1_R_INVALID_UTF8STRING 134
|
||||
#define ASN1_R_INVALID_VALUE 219
|
||||
#define ASN1_R_LENGTH_TOO_LONG 231
|
||||
#define ASN1_R_LIST_ERROR 188
|
||||
#define ASN1_R_MIME_NO_CONTENT_TYPE 206
|
||||
#define ASN1_R_MIME_PARSE_ERROR 207
|
||||
#define ASN1_R_MIME_SIG_PARSE_ERROR 208
|
||||
#define ASN1_R_MISSING_EOC 137
|
||||
#define ASN1_R_MISSING_SECOND_NUMBER 138
|
||||
#define ASN1_R_MISSING_VALUE 189
|
||||
#define ASN1_R_MSTRING_NOT_UNIVERSAL 139
|
||||
#define ASN1_R_MSTRING_WRONG_TAG 140
|
||||
#define ASN1_R_NESTED_ASN1_STRING 197
|
||||
#define ASN1_R_NESTED_TOO_DEEP 201
|
||||
#define ASN1_R_NON_HEX_CHARACTERS 141
|
||||
#define ASN1_R_NOT_ASCII_FORMAT 190
|
||||
#define ASN1_R_NOT_ENOUGH_DATA 142
|
||||
#define ASN1_R_NO_CONTENT_TYPE 209
|
||||
#define ASN1_R_NO_MATCHING_CHOICE_TYPE 143
|
||||
#define ASN1_R_NO_MULTIPART_BODY_FAILURE 210
|
||||
#define ASN1_R_NO_MULTIPART_BOUNDARY 211
|
||||
#define ASN1_R_NO_SIG_CONTENT_TYPE 212
|
||||
#define ASN1_R_NULL_IS_WRONG_LENGTH 144
|
||||
#define ASN1_R_OBJECT_NOT_ASCII_FORMAT 191
|
||||
#define ASN1_R_ODD_NUMBER_OF_CHARS 145
|
||||
#define ASN1_R_SECOND_NUMBER_TOO_LARGE 147
|
||||
#define ASN1_R_SEQUENCE_LENGTH_MISMATCH 148
|
||||
#define ASN1_R_SEQUENCE_NOT_CONSTRUCTED 149
|
||||
#define ASN1_R_SEQUENCE_OR_SET_NEEDS_CONFIG 192
|
||||
#define ASN1_R_SHORT_LINE 150
|
||||
#define ASN1_R_SIG_INVALID_MIME_TYPE 213
|
||||
#define ASN1_R_STREAMING_NOT_SUPPORTED 202
|
||||
#define ASN1_R_STRING_TOO_LONG 151
|
||||
#define ASN1_R_STRING_TOO_SHORT 152
|
||||
#define ASN1_R_THE_ASN1_OBJECT_IDENTIFIER_IS_NOT_KNOWN_FOR_THIS_MD 154
|
||||
#define ASN1_R_TIME_NOT_ASCII_FORMAT 193
|
||||
#define ASN1_R_TOO_LARGE 223
|
||||
#define ASN1_R_TOO_LONG 155
|
||||
#define ASN1_R_TOO_SMALL 224
|
||||
#define ASN1_R_TYPE_NOT_CONSTRUCTED 156
|
||||
#define ASN1_R_TYPE_NOT_PRIMITIVE 195
|
||||
#define ASN1_R_UNEXPECTED_EOC 159
|
||||
#define ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH 215
|
||||
#define ASN1_R_UNKNOWN_DIGEST 229
|
||||
#define ASN1_R_UNKNOWN_FORMAT 160
|
||||
#define ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM 161
|
||||
#define ASN1_R_UNKNOWN_OBJECT_TYPE 162
|
||||
#define ASN1_R_UNKNOWN_PUBLIC_KEY_TYPE 163
|
||||
#define ASN1_R_UNKNOWN_SIGNATURE_ALGORITHM 199
|
||||
#define ASN1_R_UNKNOWN_TAG 194
|
||||
#define ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE 164
|
||||
#define ASN1_R_UNSUPPORTED_CIPHER 228
|
||||
#define ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE 167
|
||||
#define ASN1_R_UNSUPPORTED_TYPE 196
|
||||
#define ASN1_R_UTCTIME_IS_TOO_SHORT 233
|
||||
#define ASN1_R_WRONG_INTEGER_TYPE 225
|
||||
#define ASN1_R_WRONG_PUBLIC_KEY_TYPE 200
|
||||
#define ASN1_R_WRONG_TAG 168
|
||||
|
||||
#endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 2015-2022 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (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
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
@@ -9,33 +9,44 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifndef HEADER_ASYNC_H
|
||||
# define HEADER_ASYNC_H
|
||||
#ifndef OPENSSL_ASYNC_H
|
||||
#define OPENSSL_ASYNC_H
|
||||
#pragma once
|
||||
|
||||
#include <openssl/macros.h>
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#define HEADER_ASYNC_H
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
# if defined(BASETYPES) || defined(_WINDEF_H)
|
||||
#if defined(BASETYPES) || defined(_WINDEF_H)
|
||||
/* application has to include <windows.h> to use this */
|
||||
#define OSSL_ASYNC_FD HANDLE
|
||||
#define OSSL_BAD_ASYNC_FD INVALID_HANDLE_VALUE
|
||||
# endif
|
||||
#else
|
||||
#define OSSL_ASYNC_FD int
|
||||
#define OSSL_BAD_ASYNC_FD -1
|
||||
#define OSSL_ASYNC_FD HANDLE
|
||||
#define OSSL_BAD_ASYNC_FD INVALID_HANDLE_VALUE
|
||||
#endif
|
||||
# include <openssl/asyncerr.h>
|
||||
#else
|
||||
#define OSSL_ASYNC_FD int
|
||||
#define OSSL_BAD_ASYNC_FD -1
|
||||
#endif
|
||||
#include <openssl/asyncerr.h>
|
||||
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
#endif
|
||||
|
||||
typedef struct async_job_st ASYNC_JOB;
|
||||
typedef struct async_wait_ctx_st ASYNC_WAIT_CTX;
|
||||
typedef int (*ASYNC_callback_fn)(void *arg);
|
||||
|
||||
#define ASYNC_ERR 0
|
||||
#define ASYNC_NO_JOBS 1
|
||||
#define ASYNC_PAUSE 2
|
||||
#define ASYNC_FINISH 3
|
||||
#define ASYNC_ERR 0
|
||||
#define ASYNC_NO_JOBS 1
|
||||
#define ASYNC_PAUSE 2
|
||||
#define ASYNC_FINISH 3
|
||||
|
||||
#define ASYNC_STATUS_UNSUPPORTED 0
|
||||
#define ASYNC_STATUS_ERR 1
|
||||
#define ASYNC_STATUS_OK 2
|
||||
#define ASYNC_STATUS_EAGAIN 3
|
||||
|
||||
int ASYNC_init_thread(size_t max_size, size_t init_size);
|
||||
void ASYNC_cleanup_thread(void);
|
||||
@@ -44,24 +55,40 @@ void ASYNC_cleanup_thread(void);
|
||||
ASYNC_WAIT_CTX *ASYNC_WAIT_CTX_new(void);
|
||||
void ASYNC_WAIT_CTX_free(ASYNC_WAIT_CTX *ctx);
|
||||
int ASYNC_WAIT_CTX_set_wait_fd(ASYNC_WAIT_CTX *ctx, const void *key,
|
||||
OSSL_ASYNC_FD fd,
|
||||
void *custom_data,
|
||||
void (*cleanup)(ASYNC_WAIT_CTX *, const void *,
|
||||
OSSL_ASYNC_FD, void *));
|
||||
OSSL_ASYNC_FD fd,
|
||||
void *custom_data,
|
||||
void (*cleanup)(ASYNC_WAIT_CTX *, const void *,
|
||||
OSSL_ASYNC_FD, void *));
|
||||
int ASYNC_WAIT_CTX_get_fd(ASYNC_WAIT_CTX *ctx, const void *key,
|
||||
OSSL_ASYNC_FD *fd, void **custom_data);
|
||||
OSSL_ASYNC_FD *fd, void **custom_data);
|
||||
int ASYNC_WAIT_CTX_get_all_fds(ASYNC_WAIT_CTX *ctx, OSSL_ASYNC_FD *fd,
|
||||
size_t *numfds);
|
||||
size_t *numfds);
|
||||
int ASYNC_WAIT_CTX_get_callback(ASYNC_WAIT_CTX *ctx,
|
||||
ASYNC_callback_fn *callback,
|
||||
void **callback_arg);
|
||||
int ASYNC_WAIT_CTX_set_callback(ASYNC_WAIT_CTX *ctx,
|
||||
ASYNC_callback_fn callback,
|
||||
void *callback_arg);
|
||||
int ASYNC_WAIT_CTX_set_status(ASYNC_WAIT_CTX *ctx, int status);
|
||||
int ASYNC_WAIT_CTX_get_status(ASYNC_WAIT_CTX *ctx);
|
||||
int ASYNC_WAIT_CTX_get_changed_fds(ASYNC_WAIT_CTX *ctx, OSSL_ASYNC_FD *addfd,
|
||||
size_t *numaddfds, OSSL_ASYNC_FD *delfd,
|
||||
size_t *numdelfds);
|
||||
size_t *numaddfds, OSSL_ASYNC_FD *delfd,
|
||||
size_t *numdelfds);
|
||||
int ASYNC_WAIT_CTX_clear_fd(ASYNC_WAIT_CTX *ctx, const void *key);
|
||||
#endif
|
||||
|
||||
int ASYNC_is_capable(void);
|
||||
|
||||
typedef void *(*ASYNC_stack_alloc_fn)(size_t *num);
|
||||
typedef void (*ASYNC_stack_free_fn)(void *addr);
|
||||
|
||||
int ASYNC_set_mem_functions(ASYNC_stack_alloc_fn alloc_fn,
|
||||
ASYNC_stack_free_fn free_fn);
|
||||
void ASYNC_get_mem_functions(ASYNC_stack_alloc_fn *alloc_fn,
|
||||
ASYNC_stack_free_fn *free_fn);
|
||||
|
||||
int ASYNC_start_job(ASYNC_JOB **job, ASYNC_WAIT_CTX *ctx, int *ret,
|
||||
int (*func)(void *), void *args, size_t size);
|
||||
int (*func)(void *), void *args, size_t size);
|
||||
int ASYNC_pause_job(void);
|
||||
|
||||
ASYNC_JOB *ASYNC_get_current_job(void);
|
||||
@@ -69,8 +96,7 @@ ASYNC_WAIT_CTX *ASYNC_get_wait_ctx(ASYNC_JOB *job);
|
||||
void ASYNC_block_pause(void);
|
||||
void ASYNC_unblock_pause(void);
|
||||
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1,42 +1,27 @@
|
||||
/*
|
||||
* Generated by util/mkerr.pl DO NOT EDIT
|
||||
* Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (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
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#ifndef HEADER_ASYNCERR_H
|
||||
# define HEADER_ASYNCERR_H
|
||||
#ifndef OPENSSL_ASYNCERR_H
|
||||
#define OPENSSL_ASYNCERR_H
|
||||
#pragma once
|
||||
|
||||
# ifndef HEADER_SYMHACKS_H
|
||||
# include <openssl/symhacks.h>
|
||||
# endif
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C"
|
||||
# endif
|
||||
int ERR_load_ASYNC_strings(void);
|
||||
|
||||
/*
|
||||
* ASYNC function codes.
|
||||
*/
|
||||
# define ASYNC_F_ASYNC_CTX_NEW 100
|
||||
# define ASYNC_F_ASYNC_INIT_THREAD 101
|
||||
# define ASYNC_F_ASYNC_JOB_NEW 102
|
||||
# define ASYNC_F_ASYNC_PAUSE_JOB 103
|
||||
# define ASYNC_F_ASYNC_START_FUNC 104
|
||||
# define ASYNC_F_ASYNC_START_JOB 105
|
||||
# define ASYNC_F_ASYNC_WAIT_CTX_SET_WAIT_FD 106
|
||||
#include <openssl/opensslconf.h>
|
||||
#include <openssl/symhacks.h>
|
||||
#include <openssl/cryptoerr_legacy.h>
|
||||
|
||||
/*
|
||||
* ASYNC reason codes.
|
||||
*/
|
||||
# define ASYNC_R_FAILED_TO_SET_POOL 101
|
||||
# define ASYNC_R_FAILED_TO_SWAP_CONTEXT 102
|
||||
# define ASYNC_R_INIT_FAILED 105
|
||||
# define ASYNC_R_INVALID_POOL_SIZE 103
|
||||
#define ASYNC_R_FAILED_TO_SET_POOL 101
|
||||
#define ASYNC_R_FAILED_TO_SWAP_CONTEXT 102
|
||||
#define ASYNC_R_INIT_FAILED 105
|
||||
#define ASYNC_R_INVALID_POOL_SIZE 103
|
||||
|
||||
#endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,124 +1,70 @@
|
||||
/*
|
||||
* Generated by util/mkerr.pl DO NOT EDIT
|
||||
* Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (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
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#ifndef HEADER_BIOERR_H
|
||||
# define HEADER_BIOERR_H
|
||||
#ifndef OPENSSL_BIOERR_H
|
||||
#define OPENSSL_BIOERR_H
|
||||
#pragma once
|
||||
|
||||
# ifndef HEADER_SYMHACKS_H
|
||||
# include <openssl/symhacks.h>
|
||||
# endif
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C"
|
||||
# endif
|
||||
int ERR_load_BIO_strings(void);
|
||||
|
||||
/*
|
||||
* BIO function codes.
|
||||
*/
|
||||
# define BIO_F_ACPT_STATE 100
|
||||
# define BIO_F_ADDRINFO_WRAP 148
|
||||
# define BIO_F_ADDR_STRINGS 134
|
||||
# define BIO_F_BIO_ACCEPT 101
|
||||
# define BIO_F_BIO_ACCEPT_EX 137
|
||||
# define BIO_F_BIO_ACCEPT_NEW 152
|
||||
# define BIO_F_BIO_ADDR_NEW 144
|
||||
# define BIO_F_BIO_BIND 147
|
||||
# define BIO_F_BIO_CALLBACK_CTRL 131
|
||||
# define BIO_F_BIO_CONNECT 138
|
||||
# define BIO_F_BIO_CONNECT_NEW 153
|
||||
# define BIO_F_BIO_CTRL 103
|
||||
# define BIO_F_BIO_GETS 104
|
||||
# define BIO_F_BIO_GET_HOST_IP 106
|
||||
# define BIO_F_BIO_GET_NEW_INDEX 102
|
||||
# define BIO_F_BIO_GET_PORT 107
|
||||
# define BIO_F_BIO_LISTEN 139
|
||||
# define BIO_F_BIO_LOOKUP 135
|
||||
# define BIO_F_BIO_LOOKUP_EX 143
|
||||
# define BIO_F_BIO_MAKE_PAIR 121
|
||||
# define BIO_F_BIO_METH_NEW 146
|
||||
# define BIO_F_BIO_NEW 108
|
||||
# define BIO_F_BIO_NEW_DGRAM_SCTP 145
|
||||
# define BIO_F_BIO_NEW_FILE 109
|
||||
# define BIO_F_BIO_NEW_MEM_BUF 126
|
||||
# define BIO_F_BIO_NREAD 123
|
||||
# define BIO_F_BIO_NREAD0 124
|
||||
# define BIO_F_BIO_NWRITE 125
|
||||
# define BIO_F_BIO_NWRITE0 122
|
||||
# define BIO_F_BIO_PARSE_HOSTSERV 136
|
||||
# define BIO_F_BIO_PUTS 110
|
||||
# define BIO_F_BIO_READ 111
|
||||
# define BIO_F_BIO_READ_EX 105
|
||||
# define BIO_F_BIO_READ_INTERN 120
|
||||
# define BIO_F_BIO_SOCKET 140
|
||||
# define BIO_F_BIO_SOCKET_NBIO 142
|
||||
# define BIO_F_BIO_SOCK_INFO 141
|
||||
# define BIO_F_BIO_SOCK_INIT 112
|
||||
# define BIO_F_BIO_WRITE 113
|
||||
# define BIO_F_BIO_WRITE_EX 119
|
||||
# define BIO_F_BIO_WRITE_INTERN 128
|
||||
# define BIO_F_BUFFER_CTRL 114
|
||||
# define BIO_F_CONN_CTRL 127
|
||||
# define BIO_F_CONN_STATE 115
|
||||
# define BIO_F_DGRAM_SCTP_NEW 149
|
||||
# define BIO_F_DGRAM_SCTP_READ 132
|
||||
# define BIO_F_DGRAM_SCTP_WRITE 133
|
||||
# define BIO_F_DOAPR_OUTCH 150
|
||||
# define BIO_F_FILE_CTRL 116
|
||||
# define BIO_F_FILE_READ 130
|
||||
# define BIO_F_LINEBUFFER_CTRL 129
|
||||
# define BIO_F_LINEBUFFER_NEW 151
|
||||
# define BIO_F_MEM_WRITE 117
|
||||
# define BIO_F_NBIOF_NEW 154
|
||||
# define BIO_F_SLG_WRITE 155
|
||||
# define BIO_F_SSL_NEW 118
|
||||
#include <openssl/opensslconf.h>
|
||||
#include <openssl/symhacks.h>
|
||||
#include <openssl/cryptoerr_legacy.h>
|
||||
|
||||
/*
|
||||
* BIO reason codes.
|
||||
*/
|
||||
# define BIO_R_ACCEPT_ERROR 100
|
||||
# define BIO_R_ADDRINFO_ADDR_IS_NOT_AF_INET 141
|
||||
# define BIO_R_AMBIGUOUS_HOST_OR_SERVICE 129
|
||||
# define BIO_R_BAD_FOPEN_MODE 101
|
||||
# define BIO_R_BROKEN_PIPE 124
|
||||
# define BIO_R_CONNECT_ERROR 103
|
||||
# define BIO_R_GETHOSTBYNAME_ADDR_IS_NOT_AF_INET 107
|
||||
# define BIO_R_GETSOCKNAME_ERROR 132
|
||||
# define BIO_R_GETSOCKNAME_TRUNCATED_ADDRESS 133
|
||||
# define BIO_R_GETTING_SOCKTYPE 134
|
||||
# define BIO_R_INVALID_ARGUMENT 125
|
||||
# define BIO_R_INVALID_SOCKET 135
|
||||
# define BIO_R_IN_USE 123
|
||||
# define BIO_R_LENGTH_TOO_LONG 102
|
||||
# define BIO_R_LISTEN_V6_ONLY 136
|
||||
# define BIO_R_LOOKUP_RETURNED_NOTHING 142
|
||||
# define BIO_R_MALFORMED_HOST_OR_SERVICE 130
|
||||
# define BIO_R_NBIO_CONNECT_ERROR 110
|
||||
# define BIO_R_NO_ACCEPT_ADDR_OR_SERVICE_SPECIFIED 143
|
||||
# define BIO_R_NO_HOSTNAME_OR_SERVICE_SPECIFIED 144
|
||||
# define BIO_R_NO_PORT_DEFINED 113
|
||||
# define BIO_R_NO_SUCH_FILE 128
|
||||
# define BIO_R_NULL_PARAMETER 115
|
||||
# define BIO_R_UNABLE_TO_BIND_SOCKET 117
|
||||
# define BIO_R_UNABLE_TO_CREATE_SOCKET 118
|
||||
# define BIO_R_UNABLE_TO_KEEPALIVE 137
|
||||
# define BIO_R_UNABLE_TO_LISTEN_SOCKET 119
|
||||
# define BIO_R_UNABLE_TO_NODELAY 138
|
||||
# define BIO_R_UNABLE_TO_REUSEADDR 139
|
||||
# define BIO_R_UNAVAILABLE_IP_FAMILY 145
|
||||
# define BIO_R_UNINITIALIZED 120
|
||||
# define BIO_R_UNKNOWN_INFO_TYPE 140
|
||||
# define BIO_R_UNSUPPORTED_IP_FAMILY 146
|
||||
# define BIO_R_UNSUPPORTED_METHOD 121
|
||||
# define BIO_R_UNSUPPORTED_PROTOCOL_FAMILY 131
|
||||
# define BIO_R_WRITE_TO_READ_ONLY_BIO 126
|
||||
# define BIO_R_WSASTARTUP 122
|
||||
#define BIO_R_ACCEPT_ERROR 100
|
||||
#define BIO_R_ADDRINFO_ADDR_IS_NOT_AF_INET 141
|
||||
#define BIO_R_AMBIGUOUS_HOST_OR_SERVICE 129
|
||||
#define BIO_R_BAD_FOPEN_MODE 101
|
||||
#define BIO_R_BROKEN_PIPE 124
|
||||
#define BIO_R_CONNECT_ERROR 103
|
||||
#define BIO_R_CONNECT_TIMEOUT 147
|
||||
#define BIO_R_GETHOSTBYNAME_ADDR_IS_NOT_AF_INET 107
|
||||
#define BIO_R_GETSOCKNAME_ERROR 132
|
||||
#define BIO_R_GETSOCKNAME_TRUNCATED_ADDRESS 133
|
||||
#define BIO_R_GETTING_SOCKTYPE 134
|
||||
#define BIO_R_INVALID_ARGUMENT 125
|
||||
#define BIO_R_INVALID_SOCKET 135
|
||||
#define BIO_R_IN_USE 123
|
||||
#define BIO_R_LENGTH_TOO_LONG 102
|
||||
#define BIO_R_LISTEN_V6_ONLY 136
|
||||
#define BIO_R_LOCAL_ADDR_NOT_AVAILABLE 111
|
||||
#define BIO_R_LOOKUP_RETURNED_NOTHING 142
|
||||
#define BIO_R_MALFORMED_HOST_OR_SERVICE 130
|
||||
#define BIO_R_NBIO_CONNECT_ERROR 110
|
||||
#define BIO_R_NON_FATAL 112
|
||||
#define BIO_R_NO_ACCEPT_ADDR_OR_SERVICE_SPECIFIED 143
|
||||
#define BIO_R_NO_HOSTNAME_OR_SERVICE_SPECIFIED 144
|
||||
#define BIO_R_NO_PORT_DEFINED 113
|
||||
#define BIO_R_NO_SUCH_FILE 128
|
||||
#define BIO_R_NULL_PARAMETER 115 /* unused */
|
||||
#define BIO_R_TFO_DISABLED 106
|
||||
#define BIO_R_TFO_NO_KERNEL_SUPPORT 108
|
||||
#define BIO_R_TRANSFER_ERROR 104
|
||||
#define BIO_R_TRANSFER_TIMEOUT 105
|
||||
#define BIO_R_UNABLE_TO_BIND_SOCKET 117
|
||||
#define BIO_R_UNABLE_TO_CREATE_SOCKET 118
|
||||
#define BIO_R_UNABLE_TO_KEEPALIVE 137
|
||||
#define BIO_R_UNABLE_TO_LISTEN_SOCKET 119
|
||||
#define BIO_R_UNABLE_TO_NODELAY 138
|
||||
#define BIO_R_UNABLE_TO_REUSEADDR 139
|
||||
#define BIO_R_UNABLE_TO_TFO 109
|
||||
#define BIO_R_UNAVAILABLE_IP_FAMILY 145
|
||||
#define BIO_R_UNINITIALIZED 120
|
||||
#define BIO_R_UNKNOWN_INFO_TYPE 140
|
||||
#define BIO_R_UNSUPPORTED_IP_FAMILY 146
|
||||
#define BIO_R_UNSUPPORTED_METHOD 121
|
||||
#define BIO_R_UNSUPPORTED_PROTOCOL_FAMILY 131
|
||||
#define BIO_R_WRITE_TO_READ_ONLY_BIO 126
|
||||
#define BIO_R_WSASTARTUP 122
|
||||
#define BIO_R_PORT_MISMATCH 150
|
||||
#define BIO_R_PEER_ADDR_NOT_AVAILABLE 151
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,61 +1,78 @@
|
||||
/*
|
||||
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (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
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#ifndef HEADER_BLOWFISH_H
|
||||
# define HEADER_BLOWFISH_H
|
||||
#ifndef OPENSSL_BLOWFISH_H
|
||||
#define OPENSSL_BLOWFISH_H
|
||||
#pragma once
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
#include <openssl/macros.h>
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#define HEADER_BLOWFISH_H
|
||||
#endif
|
||||
|
||||
# ifndef OPENSSL_NO_BF
|
||||
# include <openssl/e_os2.h>
|
||||
# ifdef __cplusplus
|
||||
#include <openssl/opensslconf.h>
|
||||
|
||||
#ifndef OPENSSL_NO_BF
|
||||
#include <openssl/e_os2.h>
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# define BF_ENCRYPT 1
|
||||
# define BF_DECRYPT 0
|
||||
#define BF_BLOCK 8
|
||||
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
|
||||
#define BF_ENCRYPT 1
|
||||
#define BF_DECRYPT 0
|
||||
|
||||
/*-
|
||||
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
* ! BF_LONG has to be at least 32 bits wide. !
|
||||
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
*/
|
||||
# define BF_LONG unsigned int
|
||||
typedef unsigned int BF_LONG;
|
||||
|
||||
# define BF_ROUNDS 16
|
||||
# define BF_BLOCK 8
|
||||
#define BF_ROUNDS 16
|
||||
|
||||
typedef struct bf_key_st {
|
||||
BF_LONG P[BF_ROUNDS + 2];
|
||||
BF_LONG S[4 * 256];
|
||||
} BF_KEY;
|
||||
|
||||
void BF_set_key(BF_KEY *key, int len, const unsigned char *data);
|
||||
#endif /* OPENSSL_NO_DEPRECATED_3_0 */
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
OSSL_DEPRECATEDIN_3_0 void BF_set_key(BF_KEY *key, int len,
|
||||
const unsigned char *data);
|
||||
OSSL_DEPRECATEDIN_3_0 void BF_encrypt(BF_LONG *data, const BF_KEY *key);
|
||||
OSSL_DEPRECATEDIN_3_0 void BF_decrypt(BF_LONG *data, const BF_KEY *key);
|
||||
OSSL_DEPRECATEDIN_3_0 void BF_ecb_encrypt(const unsigned char *in,
|
||||
unsigned char *out, const BF_KEY *key,
|
||||
int enc);
|
||||
OSSL_DEPRECATEDIN_3_0 void BF_cbc_encrypt(const unsigned char *in,
|
||||
unsigned char *out, long length,
|
||||
const BF_KEY *schedule,
|
||||
unsigned char *ivec, int enc);
|
||||
OSSL_DEPRECATEDIN_3_0 void BF_cfb64_encrypt(const unsigned char *in,
|
||||
unsigned char *out,
|
||||
long length, const BF_KEY *schedule,
|
||||
unsigned char *ivec, int *num,
|
||||
int enc);
|
||||
OSSL_DEPRECATEDIN_3_0 void BF_ofb64_encrypt(const unsigned char *in,
|
||||
unsigned char *out,
|
||||
long length, const BF_KEY *schedule,
|
||||
unsigned char *ivec, int *num);
|
||||
OSSL_DEPRECATEDIN_3_0 const char *BF_options(void);
|
||||
#endif
|
||||
|
||||
void BF_encrypt(BF_LONG *data, const BF_KEY *key);
|
||||
void BF_decrypt(BF_LONG *data, const BF_KEY *key);
|
||||
|
||||
void BF_ecb_encrypt(const unsigned char *in, unsigned char *out,
|
||||
const BF_KEY *key, int enc);
|
||||
void BF_cbc_encrypt(const unsigned char *in, unsigned char *out, long length,
|
||||
const BF_KEY *schedule, unsigned char *ivec, int enc);
|
||||
void BF_cfb64_encrypt(const unsigned char *in, unsigned char *out,
|
||||
long length, const BF_KEY *schedule,
|
||||
unsigned char *ivec, int *num, int enc);
|
||||
void BF_ofb64_encrypt(const unsigned char *in, unsigned char *out,
|
||||
long length, const BF_KEY *schedule,
|
||||
unsigned char *ivec, int *num);
|
||||
const char *BF_options(void);
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,56 +1,62 @@
|
||||
/*
|
||||
* Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 1995-2026 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
|
||||
*
|
||||
* Licensed under the OpenSSL license (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
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#ifndef HEADER_BN_H
|
||||
# define HEADER_BN_H
|
||||
#ifndef OPENSSL_BN_H
|
||||
#define OPENSSL_BN_H
|
||||
#pragma once
|
||||
|
||||
# include <openssl/e_os2.h>
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# endif
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/ossl_typ.h>
|
||||
# include <openssl/crypto.h>
|
||||
# include <openssl/bnerr.h>
|
||||
#include <openssl/macros.h>
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#define HEADER_BN_H
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include <openssl/e_os2.h>
|
||||
#ifndef OPENSSL_NO_STDIO
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
#include <openssl/opensslconf.h>
|
||||
#include <openssl/types.h>
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/bnerr.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* 64-bit processor with LP64 ABI
|
||||
*/
|
||||
# ifdef SIXTY_FOUR_BIT_LONG
|
||||
# define BN_ULONG unsigned long
|
||||
# define BN_BYTES 8
|
||||
# endif
|
||||
#ifdef SIXTY_FOUR_BIT_LONG
|
||||
typedef unsigned long BN_ULONG;
|
||||
#define BN_BYTES 8
|
||||
#endif
|
||||
|
||||
/*
|
||||
* 64-bit processor other than LP64 ABI
|
||||
*/
|
||||
# ifdef SIXTY_FOUR_BIT
|
||||
# define BN_ULONG unsigned long long
|
||||
# define BN_BYTES 8
|
||||
# endif
|
||||
#ifdef SIXTY_FOUR_BIT
|
||||
typedef unsigned long long BN_ULONG;
|
||||
#define BN_BYTES 8
|
||||
#endif
|
||||
|
||||
# ifdef THIRTY_TWO_BIT
|
||||
# define BN_ULONG unsigned int
|
||||
# define BN_BYTES 4
|
||||
# endif
|
||||
#ifdef THIRTY_TWO_BIT
|
||||
typedef unsigned int BN_ULONG;
|
||||
#define BN_BYTES 4
|
||||
#endif
|
||||
|
||||
# define BN_BITS2 (BN_BYTES * 8)
|
||||
# define BN_BITS (BN_BITS2 * 2)
|
||||
# define BN_TBIT ((BN_ULONG)1 << (BN_BITS2 - 1))
|
||||
#define BN_BITS2 (BN_BYTES * 8)
|
||||
#define BN_BITS (BN_BITS2 * 2)
|
||||
#define BN_TBIT ((BN_ULONG)1 << (BN_BITS2 - 1))
|
||||
|
||||
# define BN_FLG_MALLOCED 0x01
|
||||
# define BN_FLG_STATIC_DATA 0x02
|
||||
#define BN_FLG_MALLOCED 0x01
|
||||
#define BN_FLG_STATIC_DATA 0x02
|
||||
|
||||
/*
|
||||
* avoid leaking exponent information through timing,
|
||||
@@ -58,26 +64,26 @@ extern "C" {
|
||||
* BN_div() will call BN_div_no_branch,
|
||||
* BN_mod_inverse() will call bn_mod_inverse_no_branch.
|
||||
*/
|
||||
# define BN_FLG_CONSTTIME 0x04
|
||||
# define BN_FLG_SECURE 0x08
|
||||
#define BN_FLG_CONSTTIME 0x04
|
||||
#define BN_FLG_SECURE 0x08
|
||||
|
||||
# if OPENSSL_API_COMPAT < 0x00908000L
|
||||
#ifndef OPENSSL_NO_DEPRECATED_0_9_8
|
||||
/* deprecated name for the flag */
|
||||
# define BN_FLG_EXP_CONSTTIME BN_FLG_CONSTTIME
|
||||
# define BN_FLG_FREE 0x8000 /* used for debugging */
|
||||
# endif
|
||||
#define BN_FLG_EXP_CONSTTIME BN_FLG_CONSTTIME
|
||||
#define BN_FLG_FREE 0x8000 /* used for debugging */
|
||||
#endif
|
||||
|
||||
void BN_set_flags(BIGNUM *b, int n);
|
||||
int BN_get_flags(const BIGNUM *b, int n);
|
||||
|
||||
/* Values for |top| in BN_rand() */
|
||||
#define BN_RAND_TOP_ANY -1
|
||||
#define BN_RAND_TOP_ONE 0
|
||||
#define BN_RAND_TOP_TWO 1
|
||||
#define BN_RAND_TOP_ANY -1
|
||||
#define BN_RAND_TOP_ONE 0
|
||||
#define BN_RAND_TOP_TWO 1
|
||||
|
||||
/* Values for |bottom| in BN_rand() */
|
||||
#define BN_RAND_BOTTOM_ANY 0
|
||||
#define BN_RAND_BOTTOM_ODD 1
|
||||
#define BN_RAND_BOTTOM_ANY 0
|
||||
#define BN_RAND_BOTTOM_ODD 1
|
||||
|
||||
/*
|
||||
* get a clone of a BIGNUM with changed flags, for *temporary* use only (the
|
||||
@@ -94,17 +100,18 @@ BN_GENCB *BN_GENCB_new(void);
|
||||
void BN_GENCB_free(BN_GENCB *cb);
|
||||
|
||||
/* Populate a BN_GENCB structure with an "old"-style callback */
|
||||
void BN_GENCB_set_old(BN_GENCB *gencb, void (*callback) (int, int, void *),
|
||||
void *cb_arg);
|
||||
void BN_GENCB_set_old(BN_GENCB *gencb, void (*callback)(int, int, void *),
|
||||
void *cb_arg);
|
||||
|
||||
/* Populate a BN_GENCB structure with a "new"-style callback */
|
||||
void BN_GENCB_set(BN_GENCB *gencb, int (*callback) (int, int, BN_GENCB *),
|
||||
void *cb_arg);
|
||||
void BN_GENCB_set(BN_GENCB *gencb, int (*callback)(int, int, BN_GENCB *),
|
||||
void *cb_arg);
|
||||
|
||||
void *BN_GENCB_get_arg(BN_GENCB *cb);
|
||||
|
||||
# define BN_prime_checks 0 /* default: select number of iterations based
|
||||
* on the size of the number */
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#define BN_prime_checks 0 /* default: select number of iterations based \
|
||||
* on the size of the number */
|
||||
|
||||
/*
|
||||
* BN_prime_checks_for_size() returns the number of Miller-Rabin iterations
|
||||
@@ -169,16 +176,16 @@ void *BN_GENCB_get_arg(BN_GENCB *cb);
|
||||
* (b) >= 6 | >= 12 | 34 | 64 bit
|
||||
*/
|
||||
|
||||
# define BN_prime_checks_for_size(b) ((b) >= 3747 ? 3 : \
|
||||
(b) >= 1345 ? 4 : \
|
||||
(b) >= 476 ? 5 : \
|
||||
(b) >= 400 ? 6 : \
|
||||
(b) >= 347 ? 7 : \
|
||||
(b) >= 308 ? 8 : \
|
||||
(b) >= 55 ? 27 : \
|
||||
/* b >= 6 */ 34)
|
||||
#define BN_prime_checks_for_size(b) ((b) >= 3747 ? 3 : (b) >= 1345 ? 4 \
|
||||
: (b) >= 476 ? 5 \
|
||||
: (b) >= 400 ? 6 \
|
||||
: (b) >= 347 ? 7 \
|
||||
: (b) >= 308 ? 8 \
|
||||
: (b) >= 55 ? 27 \
|
||||
: /* b >= 6 */ 34)
|
||||
#endif
|
||||
|
||||
# define BN_num_bytes(a) ((BN_num_bits(a)+7)/8)
|
||||
#define BN_num_bytes(a) ((BN_num_bits(a) + 7) / 8)
|
||||
|
||||
int BN_abs_is_word(const BIGNUM *a, const BN_ULONG w);
|
||||
int BN_is_zero(const BIGNUM *a);
|
||||
@@ -186,30 +193,44 @@ int BN_is_one(const BIGNUM *a);
|
||||
int BN_is_word(const BIGNUM *a, const BN_ULONG w);
|
||||
int BN_is_odd(const BIGNUM *a);
|
||||
|
||||
# define BN_one(a) (BN_set_word((a),1))
|
||||
#define BN_one(a) (BN_set_word((a), 1))
|
||||
|
||||
void BN_zero_ex(BIGNUM *a);
|
||||
|
||||
# if OPENSSL_API_COMPAT >= 0x00908000L
|
||||
# define BN_zero(a) BN_zero_ex(a)
|
||||
# else
|
||||
# define BN_zero(a) (BN_set_word((a),0))
|
||||
# endif
|
||||
#if OPENSSL_API_LEVEL > 908
|
||||
#define BN_zero(a) BN_zero_ex(a)
|
||||
#else
|
||||
#define BN_zero(a) (BN_set_word((a), 0))
|
||||
#endif
|
||||
|
||||
const BIGNUM *BN_value_one(void);
|
||||
char *BN_options(void);
|
||||
BN_CTX *BN_CTX_new_ex(OSSL_LIB_CTX *ctx);
|
||||
BN_CTX *BN_CTX_new(void);
|
||||
BN_CTX *BN_CTX_secure_new_ex(OSSL_LIB_CTX *ctx);
|
||||
BN_CTX *BN_CTX_secure_new(void);
|
||||
void BN_CTX_free(BN_CTX *c);
|
||||
void BN_CTX_start(BN_CTX *ctx);
|
||||
BIGNUM *BN_CTX_get(BN_CTX *ctx);
|
||||
void BN_CTX_end(BN_CTX *ctx);
|
||||
int BN_rand_ex(BIGNUM *rnd, int bits, int top, int bottom,
|
||||
unsigned int strength, BN_CTX *ctx);
|
||||
int BN_rand(BIGNUM *rnd, int bits, int top, int bottom);
|
||||
int BN_priv_rand_ex(BIGNUM *rnd, int bits, int top, int bottom,
|
||||
unsigned int strength, BN_CTX *ctx);
|
||||
int BN_priv_rand(BIGNUM *rnd, int bits, int top, int bottom);
|
||||
int BN_rand_range_ex(BIGNUM *r, const BIGNUM *range, unsigned int strength,
|
||||
BN_CTX *ctx);
|
||||
int BN_rand_range(BIGNUM *rnd, const BIGNUM *range);
|
||||
int BN_priv_rand_range_ex(BIGNUM *r, const BIGNUM *range,
|
||||
unsigned int strength, BN_CTX *ctx);
|
||||
int BN_priv_rand_range(BIGNUM *rnd, const BIGNUM *range);
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
int BN_pseudo_rand(BIGNUM *rnd, int bits, int top, int bottom);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
int BN_pseudo_rand_range(BIGNUM *rnd, const BIGNUM *range);
|
||||
#endif
|
||||
int BN_num_bits(const BIGNUM *a);
|
||||
int BN_num_bits_word(BN_ULONG l);
|
||||
int BN_security_bits(int L, int N);
|
||||
@@ -219,10 +240,18 @@ void BN_clear_free(BIGNUM *a);
|
||||
BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b);
|
||||
void BN_swap(BIGNUM *a, BIGNUM *b);
|
||||
BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret);
|
||||
BIGNUM *BN_signed_bin2bn(const unsigned char *s, int len, BIGNUM *ret);
|
||||
int BN_bn2bin(const BIGNUM *a, unsigned char *to);
|
||||
int BN_bn2binpad(const BIGNUM *a, unsigned char *to, int tolen);
|
||||
int BN_signed_bn2bin(const BIGNUM *a, unsigned char *to, int tolen);
|
||||
BIGNUM *BN_lebin2bn(const unsigned char *s, int len, BIGNUM *ret);
|
||||
BIGNUM *BN_signed_lebin2bn(const unsigned char *s, int len, BIGNUM *ret);
|
||||
int BN_bn2lebinpad(const BIGNUM *a, unsigned char *to, int tolen);
|
||||
int BN_signed_bn2lebin(const BIGNUM *a, unsigned char *to, int tolen);
|
||||
BIGNUM *BN_native2bn(const unsigned char *s, int len, BIGNUM *ret);
|
||||
BIGNUM *BN_signed_native2bn(const unsigned char *s, int len, BIGNUM *ret);
|
||||
int BN_bn2nativepad(const BIGNUM *a, unsigned char *to, int tolen);
|
||||
int BN_signed_bn2native(const BIGNUM *a, unsigned char *to, int tolen);
|
||||
BIGNUM *BN_mpi2bn(const unsigned char *s, int len, BIGNUM *ret);
|
||||
int BN_bn2mpi(const BIGNUM *a, unsigned char *to);
|
||||
int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
|
||||
@@ -243,24 +272,24 @@ void BN_set_negative(BIGNUM *b, int n);
|
||||
int BN_is_negative(const BIGNUM *b);
|
||||
|
||||
int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d,
|
||||
BN_CTX *ctx);
|
||||
# define BN_mod(rem,m,d,ctx) BN_div(NULL,(rem),(m),(d),(ctx))
|
||||
int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx);
|
||||
BN_CTX *ctx);
|
||||
#define BN_mod(rem, a, m, ctx) BN_div(NULL, (rem), (a), (m), (ctx))
|
||||
int BN_nnmod(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
|
||||
int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
|
||||
BN_CTX *ctx);
|
||||
BN_CTX *ctx);
|
||||
int BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
||||
const BIGNUM *m);
|
||||
const BIGNUM *m);
|
||||
int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
|
||||
BN_CTX *ctx);
|
||||
BN_CTX *ctx);
|
||||
int BN_mod_sub_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
||||
const BIGNUM *m);
|
||||
const BIGNUM *m);
|
||||
int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
|
||||
BN_CTX *ctx);
|
||||
BN_CTX *ctx);
|
||||
int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
|
||||
int BN_mod_lshift1(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
|
||||
int BN_mod_lshift1_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *m);
|
||||
int BN_mod_lshift(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m,
|
||||
BN_CTX *ctx);
|
||||
BN_CTX *ctx);
|
||||
int BN_mod_lshift_quick(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m);
|
||||
|
||||
BN_ULONG BN_mod_word(const BIGNUM *a, BN_ULONG w);
|
||||
@@ -279,24 +308,29 @@ int BN_lshift1(BIGNUM *r, const BIGNUM *a);
|
||||
int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
|
||||
|
||||
int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
||||
const BIGNUM *m, BN_CTX *ctx);
|
||||
const BIGNUM *m, BN_CTX *ctx);
|
||||
int BN_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
||||
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
|
||||
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
|
||||
int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
|
||||
const BIGNUM *m, BN_CTX *ctx,
|
||||
BN_MONT_CTX *in_mont);
|
||||
const BIGNUM *m, BN_CTX *ctx,
|
||||
BN_MONT_CTX *in_mont);
|
||||
int BN_mod_exp_mont_word(BIGNUM *r, BN_ULONG a, const BIGNUM *p,
|
||||
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
|
||||
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
|
||||
int BN_mod_exp2_mont(BIGNUM *r, const BIGNUM *a1, const BIGNUM *p1,
|
||||
const BIGNUM *a2, const BIGNUM *p2, const BIGNUM *m,
|
||||
BN_CTX *ctx, BN_MONT_CTX *m_ctx);
|
||||
const BIGNUM *a2, const BIGNUM *p2, const BIGNUM *m,
|
||||
BN_CTX *ctx, BN_MONT_CTX *m_ctx);
|
||||
int BN_mod_exp_simple(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
||||
const BIGNUM *m, BN_CTX *ctx);
|
||||
const BIGNUM *m, BN_CTX *ctx);
|
||||
int BN_mod_exp_mont_consttime_x2(BIGNUM *rr1, const BIGNUM *a1, const BIGNUM *p1,
|
||||
const BIGNUM *m1, BN_MONT_CTX *in_mont1,
|
||||
BIGNUM *rr2, const BIGNUM *a2, const BIGNUM *p2,
|
||||
const BIGNUM *m2, BN_MONT_CTX *in_mont2,
|
||||
BN_CTX *ctx);
|
||||
|
||||
int BN_mask_bits(BIGNUM *a, int n);
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
#ifndef OPENSSL_NO_STDIO
|
||||
int BN_print_fp(FILE *fp, const BIGNUM *a);
|
||||
# endif
|
||||
#endif
|
||||
int BN_print(BIO *bio, const BIGNUM *a);
|
||||
int BN_reciprocal(BIGNUM *r, const BIGNUM *m, int len, BN_CTX *ctx);
|
||||
int BN_rshift(BIGNUM *r, const BIGNUM *a, int n);
|
||||
@@ -315,63 +349,77 @@ int BN_gcd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
|
||||
int BN_kronecker(const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); /* returns
|
||||
* -2 for
|
||||
* error */
|
||||
int BN_are_coprime(BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
|
||||
BIGNUM *BN_mod_inverse(BIGNUM *ret,
|
||||
const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
|
||||
const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
|
||||
BIGNUM *BN_mod_sqrt(BIGNUM *ret,
|
||||
const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
|
||||
const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
|
||||
|
||||
void BN_consttime_swap(BN_ULONG swap, BIGNUM *a, BIGNUM *b, int nwords);
|
||||
|
||||
/* Deprecated versions */
|
||||
DEPRECATEDIN_0_9_8(BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe,
|
||||
const BIGNUM *add,
|
||||
const BIGNUM *rem,
|
||||
void (*callback) (int, int,
|
||||
void *),
|
||||
void *cb_arg))
|
||||
DEPRECATEDIN_0_9_8(int
|
||||
BN_is_prime(const BIGNUM *p, int nchecks,
|
||||
void (*callback) (int, int, void *),
|
||||
BN_CTX *ctx, void *cb_arg))
|
||||
DEPRECATEDIN_0_9_8(int
|
||||
BN_is_prime_fasttest(const BIGNUM *p, int nchecks,
|
||||
void (*callback) (int, int, void *),
|
||||
BN_CTX *ctx, void *cb_arg,
|
||||
int do_trial_division))
|
||||
|
||||
/* Newer versions */
|
||||
int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe, const BIGNUM *add,
|
||||
const BIGNUM *rem, BN_GENCB *cb);
|
||||
#ifndef OPENSSL_NO_DEPRECATED_0_9_8
|
||||
OSSL_DEPRECATEDIN_0_9_8
|
||||
BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe,
|
||||
const BIGNUM *add, const BIGNUM *rem,
|
||||
void (*callback)(int, int, void *),
|
||||
void *cb_arg);
|
||||
OSSL_DEPRECATEDIN_0_9_8
|
||||
int BN_is_prime(const BIGNUM *p, int nchecks,
|
||||
void (*callback)(int, int, void *),
|
||||
BN_CTX *ctx, void *cb_arg);
|
||||
OSSL_DEPRECATEDIN_0_9_8
|
||||
int BN_is_prime_fasttest(const BIGNUM *p, int nchecks,
|
||||
void (*callback)(int, int, void *),
|
||||
BN_CTX *ctx, void *cb_arg,
|
||||
int do_trial_division);
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
int BN_is_prime_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, BN_GENCB *cb);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
int BN_is_prime_fasttest_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx,
|
||||
int do_trial_division, BN_GENCB *cb);
|
||||
int do_trial_division, BN_GENCB *cb);
|
||||
#endif
|
||||
/* Newer versions */
|
||||
int BN_generate_prime_ex2(BIGNUM *ret, int bits, int safe,
|
||||
const BIGNUM *add, const BIGNUM *rem, BN_GENCB *cb,
|
||||
BN_CTX *ctx);
|
||||
int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe, const BIGNUM *add,
|
||||
const BIGNUM *rem, BN_GENCB *cb);
|
||||
int BN_check_prime(const BIGNUM *p, BN_CTX *ctx, BN_GENCB *cb);
|
||||
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
int BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx);
|
||||
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
int BN_X931_derive_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2,
|
||||
const BIGNUM *Xp, const BIGNUM *Xp1,
|
||||
const BIGNUM *Xp2, const BIGNUM *e, BN_CTX *ctx,
|
||||
BN_GENCB *cb);
|
||||
const BIGNUM *Xp, const BIGNUM *Xp1,
|
||||
const BIGNUM *Xp2, const BIGNUM *e, BN_CTX *ctx,
|
||||
BN_GENCB *cb);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
int BN_X931_generate_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2, BIGNUM *Xp1,
|
||||
BIGNUM *Xp2, const BIGNUM *Xp, const BIGNUM *e,
|
||||
BN_CTX *ctx, BN_GENCB *cb);
|
||||
BIGNUM *Xp2, const BIGNUM *Xp, const BIGNUM *e,
|
||||
BN_CTX *ctx, BN_GENCB *cb);
|
||||
#endif
|
||||
|
||||
BN_MONT_CTX *BN_MONT_CTX_new(void);
|
||||
int BN_mod_mul_montgomery(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
||||
BN_MONT_CTX *mont, BN_CTX *ctx);
|
||||
BN_MONT_CTX *mont, BN_CTX *ctx);
|
||||
int BN_to_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,
|
||||
BN_CTX *ctx);
|
||||
BN_CTX *ctx);
|
||||
int BN_from_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,
|
||||
BN_CTX *ctx);
|
||||
BN_CTX *ctx);
|
||||
void BN_MONT_CTX_free(BN_MONT_CTX *mont);
|
||||
int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx);
|
||||
BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CTX *to, BN_MONT_CTX *from);
|
||||
BN_MONT_CTX *BN_MONT_CTX_set_locked(BN_MONT_CTX **pmont, CRYPTO_RWLOCK *lock,
|
||||
const BIGNUM *mod, BN_CTX *ctx);
|
||||
const BIGNUM *mod, BN_CTX *ctx);
|
||||
|
||||
/* BN_BLINDING flags */
|
||||
# define BN_BLINDING_NO_UPDATE 0x00000001
|
||||
# define BN_BLINDING_NO_RECREATE 0x00000002
|
||||
#define BN_BLINDING_NO_UPDATE 0x00000001
|
||||
#define BN_BLINDING_NO_RECREATE 0x00000002
|
||||
|
||||
BN_BLINDING *BN_BLINDING_new(const BIGNUM *A, const BIGNUM *Ai, BIGNUM *mod);
|
||||
void BN_BLINDING_free(BN_BLINDING *b);
|
||||
@@ -380,7 +428,7 @@ int BN_BLINDING_convert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
|
||||
int BN_BLINDING_invert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
|
||||
int BN_BLINDING_convert_ex(BIGNUM *n, BIGNUM *r, BN_BLINDING *b, BN_CTX *);
|
||||
int BN_BLINDING_invert_ex(BIGNUM *n, const BIGNUM *r, BN_BLINDING *b,
|
||||
BN_CTX *);
|
||||
BN_CTX *);
|
||||
|
||||
int BN_BLINDING_is_current_thread(BN_BLINDING *b);
|
||||
void BN_BLINDING_set_current_thread(BN_BLINDING *b);
|
||||
@@ -390,30 +438,32 @@ int BN_BLINDING_unlock(BN_BLINDING *b);
|
||||
unsigned long BN_BLINDING_get_flags(const BN_BLINDING *);
|
||||
void BN_BLINDING_set_flags(BN_BLINDING *, unsigned long);
|
||||
BN_BLINDING *BN_BLINDING_create_param(BN_BLINDING *b,
|
||||
const BIGNUM *e, BIGNUM *m, BN_CTX *ctx,
|
||||
int (*bn_mod_exp) (BIGNUM *r,
|
||||
const BIGNUM *a,
|
||||
const BIGNUM *p,
|
||||
const BIGNUM *m,
|
||||
BN_CTX *ctx,
|
||||
BN_MONT_CTX *m_ctx),
|
||||
BN_MONT_CTX *m_ctx);
|
||||
|
||||
DEPRECATEDIN_0_9_8(void BN_set_params(int mul, int high, int low, int mont))
|
||||
DEPRECATEDIN_0_9_8(int BN_get_params(int which)) /* 0, mul, 1 high, 2 low, 3
|
||||
* mont */
|
||||
const BIGNUM *e, BIGNUM *m, BN_CTX *ctx,
|
||||
int (*bn_mod_exp)(BIGNUM *r,
|
||||
const BIGNUM *a,
|
||||
const BIGNUM *p,
|
||||
const BIGNUM *m,
|
||||
BN_CTX *ctx,
|
||||
BN_MONT_CTX *m_ctx),
|
||||
BN_MONT_CTX *m_ctx);
|
||||
#ifndef OPENSSL_NO_DEPRECATED_0_9_8
|
||||
OSSL_DEPRECATEDIN_0_9_8
|
||||
void BN_set_params(int mul, int high, int low, int mont);
|
||||
OSSL_DEPRECATEDIN_0_9_8
|
||||
int BN_get_params(int which); /* 0, mul, 1 high, 2 low, 3 mont */
|
||||
#endif
|
||||
|
||||
BN_RECP_CTX *BN_RECP_CTX_new(void);
|
||||
void BN_RECP_CTX_free(BN_RECP_CTX *recp);
|
||||
int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *rdiv, BN_CTX *ctx);
|
||||
int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y,
|
||||
BN_RECP_CTX *recp, BN_CTX *ctx);
|
||||
BN_RECP_CTX *recp, BN_CTX *ctx);
|
||||
int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
||||
const BIGNUM *m, BN_CTX *ctx);
|
||||
const BIGNUM *m, BN_CTX *ctx);
|
||||
int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m,
|
||||
BN_RECP_CTX *recp, BN_CTX *ctx);
|
||||
BN_RECP_CTX *recp, BN_CTX *ctx);
|
||||
|
||||
# ifndef OPENSSL_NO_EC2M
|
||||
#ifndef OPENSSL_NO_EC2M
|
||||
|
||||
/*
|
||||
* Functions for arithmetic over binary polynomials represented by BIGNUMs.
|
||||
@@ -426,31 +476,31 @@ int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m,
|
||||
* r = a + b
|
||||
*/
|
||||
int BN_GF2m_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
|
||||
# define BN_GF2m_sub(r, a, b) BN_GF2m_add(r, a, b)
|
||||
#define BN_GF2m_sub(r, a, b) BN_GF2m_add(r, a, b)
|
||||
/*
|
||||
* r=a mod p
|
||||
*/
|
||||
int BN_GF2m_mod(BIGNUM *r, const BIGNUM *a, const BIGNUM *p);
|
||||
/* r = (a * b) mod p */
|
||||
int BN_GF2m_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
||||
const BIGNUM *p, BN_CTX *ctx);
|
||||
const BIGNUM *p, BN_CTX *ctx);
|
||||
/* r = (a * a) mod p */
|
||||
int BN_GF2m_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
|
||||
/* r = (1 / b) mod p */
|
||||
int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *b, const BIGNUM *p, BN_CTX *ctx);
|
||||
/* r = (a / b) mod p */
|
||||
int BN_GF2m_mod_div(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
||||
const BIGNUM *p, BN_CTX *ctx);
|
||||
const BIGNUM *p, BN_CTX *ctx);
|
||||
/* r = (a ^ b) mod p */
|
||||
int BN_GF2m_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
||||
const BIGNUM *p, BN_CTX *ctx);
|
||||
const BIGNUM *p, BN_CTX *ctx);
|
||||
/* r = sqrt(a) mod p */
|
||||
int BN_GF2m_mod_sqrt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
||||
BN_CTX *ctx);
|
||||
BN_CTX *ctx);
|
||||
/* r^2 + r = a mod p */
|
||||
int BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
||||
BN_CTX *ctx);
|
||||
# define BN_GF2m_cmp(a, b) BN_ucmp((a), (b))
|
||||
BN_CTX *ctx);
|
||||
#define BN_GF2m_cmp(a, b) BN_ucmp((a), (b))
|
||||
/*-
|
||||
* Some functions allow for representation of the irreducible polynomials
|
||||
* as an unsigned int[], say p. The irreducible f(t) is then of the form:
|
||||
@@ -461,29 +511,29 @@ int BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
||||
int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const int p[]);
|
||||
/* r = (a * b) mod p */
|
||||
int BN_GF2m_mod_mul_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
||||
const int p[], BN_CTX *ctx);
|
||||
const int p[], BN_CTX *ctx);
|
||||
/* r = (a * a) mod p */
|
||||
int BN_GF2m_mod_sqr_arr(BIGNUM *r, const BIGNUM *a, const int p[],
|
||||
BN_CTX *ctx);
|
||||
BN_CTX *ctx);
|
||||
/* r = (1 / b) mod p */
|
||||
int BN_GF2m_mod_inv_arr(BIGNUM *r, const BIGNUM *b, const int p[],
|
||||
BN_CTX *ctx);
|
||||
BN_CTX *ctx);
|
||||
/* r = (a / b) mod p */
|
||||
int BN_GF2m_mod_div_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
||||
const int p[], BN_CTX *ctx);
|
||||
const int p[], BN_CTX *ctx);
|
||||
/* r = (a ^ b) mod p */
|
||||
int BN_GF2m_mod_exp_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
||||
const int p[], BN_CTX *ctx);
|
||||
const int p[], BN_CTX *ctx);
|
||||
/* r = sqrt(a) mod p */
|
||||
int BN_GF2m_mod_sqrt_arr(BIGNUM *r, const BIGNUM *a,
|
||||
const int p[], BN_CTX *ctx);
|
||||
const int p[], BN_CTX *ctx);
|
||||
/* r^2 + r = a mod p */
|
||||
int BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a,
|
||||
const int p[], BN_CTX *ctx);
|
||||
const int p[], BN_CTX *ctx);
|
||||
int BN_GF2m_poly2arr(const BIGNUM *a, int p[], int max);
|
||||
int BN_GF2m_arr2poly(const int p[], BIGNUM *a);
|
||||
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* faster mod functions for the 'NIST primes' 0 <= a < p^2
|
||||
@@ -500,12 +550,12 @@ const BIGNUM *BN_get0_nist_prime_256(void);
|
||||
const BIGNUM *BN_get0_nist_prime_384(void);
|
||||
const BIGNUM *BN_get0_nist_prime_521(void);
|
||||
|
||||
int (*BN_nist_mod_func(const BIGNUM *p)) (BIGNUM *r, const BIGNUM *a,
|
||||
const BIGNUM *field, BN_CTX *ctx);
|
||||
int (*BN_nist_mod_func(const BIGNUM *p))(BIGNUM *r, const BIGNUM *a,
|
||||
const BIGNUM *field, BN_CTX *ctx);
|
||||
|
||||
int BN_generate_dsa_nonce(BIGNUM *out, const BIGNUM *range,
|
||||
const BIGNUM *priv, const unsigned char *message,
|
||||
size_t message_len, BN_CTX *ctx);
|
||||
const BIGNUM *priv, const unsigned char *message,
|
||||
size_t message_len, BN_CTX *ctx);
|
||||
|
||||
/* Primes from RFC 2409 */
|
||||
BIGNUM *BN_get_rfc2409_prime_768(BIGNUM *bn);
|
||||
@@ -519,21 +569,20 @@ BIGNUM *BN_get_rfc3526_prime_4096(BIGNUM *bn);
|
||||
BIGNUM *BN_get_rfc3526_prime_6144(BIGNUM *bn);
|
||||
BIGNUM *BN_get_rfc3526_prime_8192(BIGNUM *bn);
|
||||
|
||||
# if OPENSSL_API_COMPAT < 0x10100000L
|
||||
# define get_rfc2409_prime_768 BN_get_rfc2409_prime_768
|
||||
# define get_rfc2409_prime_1024 BN_get_rfc2409_prime_1024
|
||||
# define get_rfc3526_prime_1536 BN_get_rfc3526_prime_1536
|
||||
# define get_rfc3526_prime_2048 BN_get_rfc3526_prime_2048
|
||||
# define get_rfc3526_prime_3072 BN_get_rfc3526_prime_3072
|
||||
# define get_rfc3526_prime_4096 BN_get_rfc3526_prime_4096
|
||||
# define get_rfc3526_prime_6144 BN_get_rfc3526_prime_6144
|
||||
# define get_rfc3526_prime_8192 BN_get_rfc3526_prime_8192
|
||||
# endif
|
||||
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
#define get_rfc2409_prime_768 BN_get_rfc2409_prime_768
|
||||
#define get_rfc2409_prime_1024 BN_get_rfc2409_prime_1024
|
||||
#define get_rfc3526_prime_1536 BN_get_rfc3526_prime_1536
|
||||
#define get_rfc3526_prime_2048 BN_get_rfc3526_prime_2048
|
||||
#define get_rfc3526_prime_3072 BN_get_rfc3526_prime_3072
|
||||
#define get_rfc3526_prime_4096 BN_get_rfc3526_prime_4096
|
||||
#define get_rfc3526_prime_6144 BN_get_rfc3526_prime_6144
|
||||
#define get_rfc3526_prime_8192 BN_get_rfc3526_prime_8192
|
||||
#endif
|
||||
|
||||
int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom);
|
||||
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1,100 +1,45 @@
|
||||
/*
|
||||
* Generated by util/mkerr.pl DO NOT EDIT
|
||||
* Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (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
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#ifndef HEADER_BNERR_H
|
||||
# define HEADER_BNERR_H
|
||||
#ifndef OPENSSL_BNERR_H
|
||||
#define OPENSSL_BNERR_H
|
||||
#pragma once
|
||||
|
||||
# ifndef HEADER_SYMHACKS_H
|
||||
# include <openssl/symhacks.h>
|
||||
# endif
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C"
|
||||
# endif
|
||||
int ERR_load_BN_strings(void);
|
||||
|
||||
/*
|
||||
* BN function codes.
|
||||
*/
|
||||
# define BN_F_BNRAND 127
|
||||
# define BN_F_BNRAND_RANGE 138
|
||||
# define BN_F_BN_BLINDING_CONVERT_EX 100
|
||||
# define BN_F_BN_BLINDING_CREATE_PARAM 128
|
||||
# define BN_F_BN_BLINDING_INVERT_EX 101
|
||||
# define BN_F_BN_BLINDING_NEW 102
|
||||
# define BN_F_BN_BLINDING_UPDATE 103
|
||||
# define BN_F_BN_BN2DEC 104
|
||||
# define BN_F_BN_BN2HEX 105
|
||||
# define BN_F_BN_COMPUTE_WNAF 142
|
||||
# define BN_F_BN_CTX_GET 116
|
||||
# define BN_F_BN_CTX_NEW 106
|
||||
# define BN_F_BN_CTX_START 129
|
||||
# define BN_F_BN_DIV 107
|
||||
# define BN_F_BN_DIV_RECP 130
|
||||
# define BN_F_BN_EXP 123
|
||||
# define BN_F_BN_EXPAND_INTERNAL 120
|
||||
# define BN_F_BN_GENCB_NEW 143
|
||||
# define BN_F_BN_GENERATE_DSA_NONCE 140
|
||||
# define BN_F_BN_GENERATE_PRIME_EX 141
|
||||
# define BN_F_BN_GF2M_MOD 131
|
||||
# define BN_F_BN_GF2M_MOD_EXP 132
|
||||
# define BN_F_BN_GF2M_MOD_MUL 133
|
||||
# define BN_F_BN_GF2M_MOD_SOLVE_QUAD 134
|
||||
# define BN_F_BN_GF2M_MOD_SOLVE_QUAD_ARR 135
|
||||
# define BN_F_BN_GF2M_MOD_SQR 136
|
||||
# define BN_F_BN_GF2M_MOD_SQRT 137
|
||||
# define BN_F_BN_LSHIFT 145
|
||||
# define BN_F_BN_MOD_EXP2_MONT 118
|
||||
# define BN_F_BN_MOD_EXP_MONT 109
|
||||
# define BN_F_BN_MOD_EXP_MONT_CONSTTIME 124
|
||||
# define BN_F_BN_MOD_EXP_MONT_WORD 117
|
||||
# define BN_F_BN_MOD_EXP_RECP 125
|
||||
# define BN_F_BN_MOD_EXP_SIMPLE 126
|
||||
# define BN_F_BN_MOD_INVERSE 110
|
||||
# define BN_F_BN_MOD_INVERSE_NO_BRANCH 139
|
||||
# define BN_F_BN_MOD_LSHIFT_QUICK 119
|
||||
# define BN_F_BN_MOD_SQRT 121
|
||||
# define BN_F_BN_MONT_CTX_NEW 149
|
||||
# define BN_F_BN_MPI2BN 112
|
||||
# define BN_F_BN_NEW 113
|
||||
# define BN_F_BN_POOL_GET 147
|
||||
# define BN_F_BN_RAND 114
|
||||
# define BN_F_BN_RAND_RANGE 122
|
||||
# define BN_F_BN_RECP_CTX_NEW 150
|
||||
# define BN_F_BN_RSHIFT 146
|
||||
# define BN_F_BN_SET_WORDS 144
|
||||
# define BN_F_BN_STACK_PUSH 148
|
||||
# define BN_F_BN_USUB 115
|
||||
#include <openssl/opensslconf.h>
|
||||
#include <openssl/symhacks.h>
|
||||
#include <openssl/cryptoerr_legacy.h>
|
||||
|
||||
/*
|
||||
* BN reason codes.
|
||||
*/
|
||||
# define BN_R_ARG2_LT_ARG3 100
|
||||
# define BN_R_BAD_RECIPROCAL 101
|
||||
# define BN_R_BIGNUM_TOO_LONG 114
|
||||
# define BN_R_BITS_TOO_SMALL 118
|
||||
# define BN_R_CALLED_WITH_EVEN_MODULUS 102
|
||||
# define BN_R_DIV_BY_ZERO 103
|
||||
# define BN_R_ENCODING_ERROR 104
|
||||
# define BN_R_EXPAND_ON_STATIC_BIGNUM_DATA 105
|
||||
# define BN_R_INPUT_NOT_REDUCED 110
|
||||
# define BN_R_INVALID_LENGTH 106
|
||||
# define BN_R_INVALID_RANGE 115
|
||||
# define BN_R_INVALID_SHIFT 119
|
||||
# define BN_R_NOT_A_SQUARE 111
|
||||
# define BN_R_NOT_INITIALIZED 107
|
||||
# define BN_R_NO_INVERSE 108
|
||||
# define BN_R_NO_SOLUTION 116
|
||||
# define BN_R_PRIVATE_KEY_TOO_LARGE 117
|
||||
# define BN_R_P_IS_NOT_PRIME 112
|
||||
# define BN_R_TOO_MANY_ITERATIONS 113
|
||||
# define BN_R_TOO_MANY_TEMPORARY_VARIABLES 109
|
||||
#define BN_R_ARG2_LT_ARG3 100
|
||||
#define BN_R_BAD_RECIPROCAL 101
|
||||
#define BN_R_BIGNUM_TOO_LONG 114
|
||||
#define BN_R_BITS_TOO_SMALL 118
|
||||
#define BN_R_CALLED_WITH_EVEN_MODULUS 102
|
||||
#define BN_R_DIV_BY_ZERO 103
|
||||
#define BN_R_ENCODING_ERROR 104
|
||||
#define BN_R_EXPAND_ON_STATIC_BIGNUM_DATA 105
|
||||
#define BN_R_INPUT_NOT_REDUCED 110
|
||||
#define BN_R_INVALID_LENGTH 106
|
||||
#define BN_R_INVALID_RANGE 115
|
||||
#define BN_R_INVALID_SHIFT 119
|
||||
#define BN_R_NOT_A_SQUARE 111
|
||||
#define BN_R_NOT_INITIALIZED 107
|
||||
#define BN_R_NO_INVERSE 108
|
||||
#define BN_R_NO_PRIME_CANDIDATE 121
|
||||
#define BN_R_NO_SOLUTION 116
|
||||
#define BN_R_NO_SUITABLE_DIGEST 120
|
||||
#define BN_R_PRIVATE_KEY_TOO_LARGE 117
|
||||
#define BN_R_P_IS_NOT_PRIME 112
|
||||
#define BN_R_TOO_MANY_ITERATIONS 113
|
||||
#define BN_R_TOO_MANY_TEMPORARY_VARIABLES 109
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,48 +1,51 @@
|
||||
/*
|
||||
* Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (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
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#ifndef HEADER_BUFFER_H
|
||||
# define HEADER_BUFFER_H
|
||||
#ifndef OPENSSL_BUFFER_H
|
||||
#define OPENSSL_BUFFER_H
|
||||
#pragma once
|
||||
|
||||
# include <openssl/ossl_typ.h>
|
||||
# ifndef HEADER_CRYPTO_H
|
||||
# include <openssl/crypto.h>
|
||||
# endif
|
||||
# include <openssl/buffererr.h>
|
||||
#include <openssl/macros.h>
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#define HEADER_BUFFER_H
|
||||
#endif
|
||||
|
||||
#include <openssl/types.h>
|
||||
#ifndef OPENSSL_CRYPTO_H
|
||||
#include <openssl/crypto.h>
|
||||
#endif
|
||||
#include <openssl/buffererr.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
# include <stddef.h>
|
||||
# include <sys/types.h>
|
||||
#include <stddef.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
/*
|
||||
* These names are outdated as of OpenSSL 1.1; a future release
|
||||
* will move them to be deprecated.
|
||||
*/
|
||||
# define BUF_strdup(s) OPENSSL_strdup(s)
|
||||
# define BUF_strndup(s, size) OPENSSL_strndup(s, size)
|
||||
# define BUF_memdup(data, size) OPENSSL_memdup(data, size)
|
||||
# define BUF_strlcpy(dst, src, size) OPENSSL_strlcpy(dst, src, size)
|
||||
# define BUF_strlcat(dst, src, size) OPENSSL_strlcat(dst, src, size)
|
||||
# define BUF_strnlen(str, maxlen) OPENSSL_strnlen(str, maxlen)
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#define BUF_strdup(s) OPENSSL_strdup(s)
|
||||
#define BUF_strndup(s, size) OPENSSL_strndup(s, size)
|
||||
#define BUF_memdup(data, size) OPENSSL_memdup(data, size)
|
||||
#define BUF_strlcpy(dst, src, size) OPENSSL_strlcpy(dst, src, size)
|
||||
#define BUF_strlcat(dst, src, size) OPENSSL_strlcat(dst, src, size)
|
||||
#define BUF_strnlen(str, maxlen) OPENSSL_strnlen(str, maxlen)
|
||||
#endif
|
||||
|
||||
struct buf_mem_st {
|
||||
size_t length; /* current number of bytes */
|
||||
size_t length; /* current number of bytes */
|
||||
char *data;
|
||||
size_t max; /* size of buffer */
|
||||
size_t max; /* size of buffer */
|
||||
unsigned long flags;
|
||||
};
|
||||
|
||||
# define BUF_MEM_FLAG_SECURE 0x01
|
||||
#define BUF_MEM_FLAG_SECURE 0x01
|
||||
|
||||
BUF_MEM *BUF_MEM_new(void);
|
||||
BUF_MEM *BUF_MEM_new_ex(unsigned long flags);
|
||||
@@ -51,8 +54,7 @@ size_t BUF_MEM_grow(BUF_MEM *str, size_t len);
|
||||
size_t BUF_MEM_grow_clean(BUF_MEM *str, size_t len);
|
||||
void BUF_reverse(unsigned char *out, const unsigned char *in, size_t siz);
|
||||
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1,31 +1,20 @@
|
||||
/*
|
||||
* Generated by util/mkerr.pl DO NOT EDIT
|
||||
* Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (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
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#ifndef HEADER_BUFERR_H
|
||||
# define HEADER_BUFERR_H
|
||||
#ifndef OPENSSL_BUFFERERR_H
|
||||
#define OPENSSL_BUFFERERR_H
|
||||
#pragma once
|
||||
|
||||
# ifndef HEADER_SYMHACKS_H
|
||||
# include <openssl/symhacks.h>
|
||||
# endif
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C"
|
||||
# endif
|
||||
int ERR_load_BUF_strings(void);
|
||||
|
||||
/*
|
||||
* BUF function codes.
|
||||
*/
|
||||
# define BUF_F_BUF_MEM_GROW 100
|
||||
# define BUF_F_BUF_MEM_GROW_CLEAN 105
|
||||
# define BUF_F_BUF_MEM_NEW 101
|
||||
#include <openssl/opensslconf.h>
|
||||
#include <openssl/symhacks.h>
|
||||
#include <openssl/cryptoerr_legacy.h>
|
||||
|
||||
/*
|
||||
* BUF reason codes.
|
||||
|
||||
@@ -0,0 +1,339 @@
|
||||
/*
|
||||
* Copyright 2025 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* 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
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#ifndef OPENSSL_BYTEORDER_H
|
||||
#define OPENSSL_BYTEORDER_H
|
||||
#pragma once
|
||||
|
||||
#include <openssl/e_os2.h>
|
||||
#include <string.h>
|
||||
|
||||
/*
|
||||
* "Modern" compilers do a decent job of optimising these functions to just a
|
||||
* couple of instruction ([swap +] store, or load [+ swap]) when either no
|
||||
* swapping is required, or a suitable swap instruction is available.
|
||||
*/
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1300
|
||||
#include <stdlib.h>
|
||||
#pragma intrinsic(_byteswap_ushort)
|
||||
#pragma intrinsic(_byteswap_ulong)
|
||||
#pragma intrinsic(_byteswap_uint64)
|
||||
#define OSSL_HTOBE16(x) _byteswap_ushort(x)
|
||||
#define OSSL_HTOBE32(x) _byteswap_ulong(x)
|
||||
#define OSSL_HTOBE64(x) _byteswap_uint64(x)
|
||||
#define OSSL_BE16TOH(x) _byteswap_ushort(x)
|
||||
#define OSSL_BE32TOH(x) _byteswap_ulong(x)
|
||||
#define OSSL_BE64TOH(x) _byteswap_uint64(x)
|
||||
#define OSSL_HTOLE16(x) (x)
|
||||
#define OSSL_HTOLE32(x) (x)
|
||||
#define OSSL_HTOLE64(x) (x)
|
||||
#define OSSL_LE16TOH(x) (x)
|
||||
#define OSSL_LE32TOH(x) (x)
|
||||
#define OSSL_LE64TOH(x) (x)
|
||||
|
||||
#elif defined(__GLIBC__) && defined(__GLIBC_PREREQ)
|
||||
#if (__GLIBC_PREREQ(2, 19)) && defined(_DEFAULT_SOURCE)
|
||||
#include <endian.h>
|
||||
#define OSSL_HTOBE16(x) htobe16(x)
|
||||
#define OSSL_HTOBE32(x) htobe32(x)
|
||||
#define OSSL_HTOBE64(x) htobe64(x)
|
||||
#define OSSL_BE16TOH(x) be16toh(x)
|
||||
#define OSSL_BE32TOH(x) be32toh(x)
|
||||
#define OSSL_BE64TOH(x) be64toh(x)
|
||||
#define OSSL_HTOLE16(x) htole16(x)
|
||||
#define OSSL_HTOLE32(x) htole32(x)
|
||||
#define OSSL_HTOLE64(x) htole64(x)
|
||||
#define OSSL_LE16TOH(x) le16toh(x)
|
||||
#define OSSL_LE32TOH(x) le32toh(x)
|
||||
#define OSSL_LE64TOH(x) le64toh(x)
|
||||
#endif
|
||||
|
||||
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
#if defined(__OpenBSD__)
|
||||
#include <sys/types.h>
|
||||
#else
|
||||
#include <sys/endian.h>
|
||||
#endif
|
||||
#define OSSL_HTOBE16(x) htobe16(x)
|
||||
#define OSSL_HTOBE32(x) htobe32(x)
|
||||
#define OSSL_HTOBE64(x) htobe64(x)
|
||||
#define OSSL_BE16TOH(x) be16toh(x)
|
||||
#define OSSL_BE32TOH(x) be32toh(x)
|
||||
#define OSSL_BE64TOH(x) be64toh(x)
|
||||
#define OSSL_HTOLE16(x) htole16(x)
|
||||
#define OSSL_HTOLE32(x) htole32(x)
|
||||
#define OSSL_HTOLE64(x) htole64(x)
|
||||
#define OSSL_LE16TOH(x) le16toh(x)
|
||||
#define OSSL_LE32TOH(x) le32toh(x)
|
||||
#define OSSL_LE64TOH(x) le64toh(x)
|
||||
|
||||
#elif defined(__APPLE__)
|
||||
#include <libkern/OSByteOrder.h>
|
||||
#define OSSL_HTOBE16(x) OSSwapHostToBigInt16(x)
|
||||
#define OSSL_HTOBE32(x) OSSwapHostToBigInt32(x)
|
||||
#define OSSL_HTOBE64(x) OSSwapHostToBigInt64(x)
|
||||
#define OSSL_BE16TOH(x) OSSwapBigToHostInt16(x)
|
||||
#define OSSL_BE32TOH(x) OSSwapBigToHostInt32(x)
|
||||
#define OSSL_BE64TOH(x) OSSwapBigToHostInt64(x)
|
||||
#define OSSL_HTOLE16(x) OSSwapHostToLittleInt16(x)
|
||||
#define OSSL_HTOLE32(x) OSSwapHostToLittleInt32(x)
|
||||
#define OSSL_HTOLE64(x) OSSwapHostToLittleInt64(x)
|
||||
#define OSSL_LE16TOH(x) OSSwapLittleToHostInt16(x)
|
||||
#define OSSL_LE32TOH(x) OSSwapLittleToHostInt32(x)
|
||||
#define OSSL_LE64TOH(x) OSSwapLittleToHostInt64(x)
|
||||
|
||||
#endif
|
||||
|
||||
static ossl_inline ossl_unused unsigned char *
|
||||
OPENSSL_store_u16_le(unsigned char *out, uint16_t val)
|
||||
{
|
||||
#ifdef OSSL_HTOLE16
|
||||
uint16_t t = OSSL_HTOLE16(val);
|
||||
|
||||
memcpy(out, (unsigned char *)&t, 2);
|
||||
return out + 2;
|
||||
#else
|
||||
*out++ = (val & 0xff);
|
||||
*out++ = (val >> 8) & 0xff;
|
||||
return out;
|
||||
#endif
|
||||
}
|
||||
|
||||
static ossl_inline ossl_unused unsigned char *
|
||||
OPENSSL_store_u16_be(unsigned char *out, uint16_t val)
|
||||
{
|
||||
#ifdef OSSL_HTOBE16
|
||||
uint16_t t = OSSL_HTOBE16(val);
|
||||
|
||||
memcpy(out, (unsigned char *)&t, 2);
|
||||
return out + 2;
|
||||
#else
|
||||
*out++ = (val >> 8) & 0xff;
|
||||
*out++ = (val & 0xff);
|
||||
return out;
|
||||
#endif
|
||||
}
|
||||
|
||||
static ossl_inline ossl_unused unsigned char *
|
||||
OPENSSL_store_u32_le(unsigned char *out, uint32_t val)
|
||||
{
|
||||
#ifdef OSSL_HTOLE32
|
||||
uint32_t t = OSSL_HTOLE32(val);
|
||||
|
||||
memcpy(out, (unsigned char *)&t, 4);
|
||||
return out + 4;
|
||||
#else
|
||||
*out++ = (val & 0xff);
|
||||
*out++ = (val >> 8) & 0xff;
|
||||
*out++ = (val >> 16) & 0xff;
|
||||
*out++ = (val >> 24) & 0xff;
|
||||
return out;
|
||||
#endif
|
||||
}
|
||||
|
||||
static ossl_inline ossl_unused unsigned char *
|
||||
OPENSSL_store_u32_be(unsigned char *out, uint32_t val)
|
||||
{
|
||||
#ifdef OSSL_HTOBE32
|
||||
uint32_t t = OSSL_HTOBE32(val);
|
||||
|
||||
memcpy(out, (unsigned char *)&t, 4);
|
||||
return out + 4;
|
||||
#else
|
||||
*out++ = (val >> 24) & 0xff;
|
||||
*out++ = (val >> 16) & 0xff;
|
||||
*out++ = (val >> 8) & 0xff;
|
||||
*out++ = (val & 0xff);
|
||||
return out;
|
||||
#endif
|
||||
}
|
||||
|
||||
static ossl_inline ossl_unused unsigned char *
|
||||
OPENSSL_store_u64_le(unsigned char *out, uint64_t val)
|
||||
{
|
||||
#ifdef OSSL_HTOLE64
|
||||
uint64_t t = OSSL_HTOLE64(val);
|
||||
|
||||
memcpy(out, (unsigned char *)&t, 8);
|
||||
return out + 8;
|
||||
#else
|
||||
*out++ = (val & 0xff);
|
||||
*out++ = (val >> 8) & 0xff;
|
||||
*out++ = (val >> 16) & 0xff;
|
||||
*out++ = (val >> 24) & 0xff;
|
||||
*out++ = (val >> 32) & 0xff;
|
||||
*out++ = (val >> 40) & 0xff;
|
||||
*out++ = (val >> 48) & 0xff;
|
||||
*out++ = (val >> 56) & 0xff;
|
||||
return out;
|
||||
#endif
|
||||
}
|
||||
|
||||
static ossl_inline ossl_unused unsigned char *
|
||||
OPENSSL_store_u64_be(unsigned char *out, uint64_t val)
|
||||
{
|
||||
#ifdef OSSL_HTOLE64
|
||||
uint64_t t = OSSL_HTOBE64(val);
|
||||
|
||||
memcpy(out, (unsigned char *)&t, 8);
|
||||
return out + 8;
|
||||
#else
|
||||
*out++ = (val >> 56) & 0xff;
|
||||
*out++ = (val >> 48) & 0xff;
|
||||
*out++ = (val >> 40) & 0xff;
|
||||
*out++ = (val >> 32) & 0xff;
|
||||
*out++ = (val >> 24) & 0xff;
|
||||
*out++ = (val >> 16) & 0xff;
|
||||
*out++ = (val >> 8) & 0xff;
|
||||
*out++ = (val & 0xff);
|
||||
return out;
|
||||
#endif
|
||||
}
|
||||
|
||||
static ossl_inline ossl_unused const unsigned char *
|
||||
OPENSSL_load_u16_le(uint16_t *val, const unsigned char *in)
|
||||
{
|
||||
#ifdef OSSL_LE16TOH
|
||||
uint16_t t;
|
||||
|
||||
memcpy((unsigned char *)&t, in, 2);
|
||||
*val = OSSL_LE16TOH(t);
|
||||
return in + 2;
|
||||
#else
|
||||
uint16_t b0 = *in++;
|
||||
uint16_t b1 = *in++;
|
||||
|
||||
*val = b0 | (b1 << 8);
|
||||
return in;
|
||||
#endif
|
||||
}
|
||||
|
||||
static ossl_inline ossl_unused const unsigned char *
|
||||
OPENSSL_load_u16_be(uint16_t *val, const unsigned char *in)
|
||||
{
|
||||
#ifdef OSSL_LE16TOH
|
||||
uint16_t t;
|
||||
|
||||
memcpy((unsigned char *)&t, in, 2);
|
||||
*val = OSSL_BE16TOH(t);
|
||||
return in + 2;
|
||||
#else
|
||||
uint16_t b1 = *in++;
|
||||
uint16_t b0 = *in++;
|
||||
|
||||
*val = b0 | (b1 << 8);
|
||||
return in;
|
||||
#endif
|
||||
}
|
||||
|
||||
static ossl_inline ossl_unused const unsigned char *
|
||||
OPENSSL_load_u32_le(uint32_t *val, const unsigned char *in)
|
||||
{
|
||||
#ifdef OSSL_LE32TOH
|
||||
uint32_t t;
|
||||
|
||||
memcpy((unsigned char *)&t, in, 4);
|
||||
*val = OSSL_LE32TOH(t);
|
||||
return in + 4;
|
||||
#else
|
||||
uint32_t b0 = *in++;
|
||||
uint32_t b1 = *in++;
|
||||
uint32_t b2 = *in++;
|
||||
uint32_t b3 = *in++;
|
||||
|
||||
*val = b0 | (b1 << 8) | (b2 << 16) | (b3 << 24);
|
||||
return in;
|
||||
#endif
|
||||
}
|
||||
|
||||
static ossl_inline ossl_unused const unsigned char *
|
||||
OPENSSL_load_u32_be(uint32_t *val, const unsigned char *in)
|
||||
{
|
||||
#ifdef OSSL_LE32TOH
|
||||
uint32_t t;
|
||||
|
||||
memcpy((unsigned char *)&t, in, 4);
|
||||
*val = OSSL_BE32TOH(t);
|
||||
return in + 4;
|
||||
#else
|
||||
uint32_t b3 = *in++;
|
||||
uint32_t b2 = *in++;
|
||||
uint32_t b1 = *in++;
|
||||
uint32_t b0 = *in++;
|
||||
|
||||
*val = b0 | (b1 << 8) | (b2 << 16) | (b3 << 24);
|
||||
return in;
|
||||
#endif
|
||||
}
|
||||
|
||||
static ossl_inline ossl_unused const unsigned char *
|
||||
OPENSSL_load_u64_le(uint64_t *val, const unsigned char *in)
|
||||
{
|
||||
#ifdef OSSL_LE64TOH
|
||||
uint64_t t;
|
||||
|
||||
memcpy((unsigned char *)&t, in, 8);
|
||||
*val = OSSL_LE64TOH(t);
|
||||
return in + 8;
|
||||
#else
|
||||
uint64_t b0 = *in++;
|
||||
uint64_t b1 = *in++;
|
||||
uint64_t b2 = *in++;
|
||||
uint64_t b3 = *in++;
|
||||
uint64_t b4 = *in++;
|
||||
uint64_t b5 = *in++;
|
||||
uint64_t b6 = *in++;
|
||||
uint64_t b7 = *in++;
|
||||
|
||||
*val = b0 | (b1 << 8) | (b2 << 16) | (b3 << 24)
|
||||
| (b4 << 32) | (b5 << 40) | (b6 << 48) | (b7 << 56);
|
||||
return in;
|
||||
#endif
|
||||
}
|
||||
|
||||
static ossl_inline ossl_unused const unsigned char *
|
||||
OPENSSL_load_u64_be(uint64_t *val, const unsigned char *in)
|
||||
{
|
||||
#ifdef OSSL_LE64TOH
|
||||
uint64_t t;
|
||||
|
||||
memcpy((unsigned char *)&t, in, 8);
|
||||
*val = OSSL_BE64TOH(t);
|
||||
return in + 8;
|
||||
#else
|
||||
uint64_t b7 = *in++;
|
||||
uint64_t b6 = *in++;
|
||||
uint64_t b5 = *in++;
|
||||
uint64_t b4 = *in++;
|
||||
uint64_t b3 = *in++;
|
||||
uint64_t b2 = *in++;
|
||||
uint64_t b1 = *in++;
|
||||
uint64_t b0 = *in++;
|
||||
|
||||
*val = b0 | (b1 << 8) | (b2 << 16) | (b3 << 24)
|
||||
| (b4 << 32) | (b5 << 40) | (b6 << 48) | (b7 << 56);
|
||||
return in;
|
||||
#endif
|
||||
}
|
||||
|
||||
#undef OSSL_HTOBE16
|
||||
#undef OSSL_HTOBE32
|
||||
#undef OSSL_HTOBE64
|
||||
#undef OSSL_BE16TOH
|
||||
#undef OSSL_BE32TOH
|
||||
#undef OSSL_BE64TOH
|
||||
#undef OSSL_HTOLE16
|
||||
#undef OSSL_HTOLE32
|
||||
#undef OSSL_HTOLE64
|
||||
#undef OSSL_LE16TOH
|
||||
#undef OSSL_LE32TOH
|
||||
#undef OSSL_LE64TOH
|
||||
|
||||
#endif
|
||||
@@ -1,25 +1,35 @@
|
||||
/*
|
||||
* Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 2006-2026 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (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
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#ifndef HEADER_CAMELLIA_H
|
||||
# define HEADER_CAMELLIA_H
|
||||
#ifndef OPENSSL_CAMELLIA_H
|
||||
#define OPENSSL_CAMELLIA_H
|
||||
#pragma once
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
#include <openssl/macros.h>
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#define HEADER_CAMELLIA_H
|
||||
#endif
|
||||
|
||||
# ifndef OPENSSL_NO_CAMELLIA
|
||||
# include <stddef.h>
|
||||
#ifdef __cplusplus
|
||||
#include <openssl/opensslconf.h>
|
||||
|
||||
#ifndef OPENSSL_NO_CAMELLIA
|
||||
#include <stddef.h>
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
# define CAMELLIA_ENCRYPT 1
|
||||
# define CAMELLIA_DECRYPT 0
|
||||
#define CAMELLIA_BLOCK_SIZE 16
|
||||
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
|
||||
#define CAMELLIA_ENCRYPT 1
|
||||
#define CAMELLIA_DECRYPT 0
|
||||
|
||||
/*
|
||||
* Because array size can't be a const in C, the following two are macros.
|
||||
@@ -28,56 +38,80 @@ extern "C" {
|
||||
|
||||
/* This should be a hidden type, but EVP requires that the size be known */
|
||||
|
||||
# define CAMELLIA_BLOCK_SIZE 16
|
||||
# define CAMELLIA_TABLE_BYTE_LEN 272
|
||||
# define CAMELLIA_TABLE_WORD_LEN (CAMELLIA_TABLE_BYTE_LEN / 4)
|
||||
#define CAMELLIA_TABLE_BYTE_LEN 272
|
||||
#define CAMELLIA_TABLE_WORD_LEN (CAMELLIA_TABLE_BYTE_LEN / 4)
|
||||
|
||||
typedef unsigned int KEY_TABLE_TYPE[CAMELLIA_TABLE_WORD_LEN]; /* to match
|
||||
* with WORD */
|
||||
|
||||
struct camellia_key_st {
|
||||
union {
|
||||
double d; /* ensures 64-bit align */
|
||||
double d; /* ensures 64-bit align */
|
||||
KEY_TABLE_TYPE rd_key;
|
||||
} u;
|
||||
int grand_rounds;
|
||||
};
|
||||
typedef struct camellia_key_st CAMELLIA_KEY;
|
||||
|
||||
int Camellia_set_key(const unsigned char *userKey, const int bits,
|
||||
CAMELLIA_KEY *key);
|
||||
|
||||
void Camellia_encrypt(const unsigned char *in, unsigned char *out,
|
||||
const CAMELLIA_KEY *key);
|
||||
void Camellia_decrypt(const unsigned char *in, unsigned char *out,
|
||||
const CAMELLIA_KEY *key);
|
||||
|
||||
void Camellia_ecb_encrypt(const unsigned char *in, unsigned char *out,
|
||||
const CAMELLIA_KEY *key, const int enc);
|
||||
void Camellia_cbc_encrypt(const unsigned char *in, unsigned char *out,
|
||||
size_t length, const CAMELLIA_KEY *key,
|
||||
unsigned char *ivec, const int enc);
|
||||
void Camellia_cfb128_encrypt(const unsigned char *in, unsigned char *out,
|
||||
size_t length, const CAMELLIA_KEY *key,
|
||||
unsigned char *ivec, int *num, const int enc);
|
||||
void Camellia_cfb1_encrypt(const unsigned char *in, unsigned char *out,
|
||||
size_t length, const CAMELLIA_KEY *key,
|
||||
unsigned char *ivec, int *num, const int enc);
|
||||
void Camellia_cfb8_encrypt(const unsigned char *in, unsigned char *out,
|
||||
size_t length, const CAMELLIA_KEY *key,
|
||||
unsigned char *ivec, int *num, const int enc);
|
||||
void Camellia_ofb128_encrypt(const unsigned char *in, unsigned char *out,
|
||||
size_t length, const CAMELLIA_KEY *key,
|
||||
unsigned char *ivec, int *num);
|
||||
#endif /* OPENSSL_NO_DEPRECATED_3_0 */
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
OSSL_DEPRECATEDIN_3_0 int Camellia_set_key(const unsigned char *userKey,
|
||||
int bits,
|
||||
CAMELLIA_KEY *key);
|
||||
OSSL_DEPRECATEDIN_3_0 void Camellia_encrypt(const unsigned char *in,
|
||||
unsigned char *out,
|
||||
const CAMELLIA_KEY *key);
|
||||
OSSL_DEPRECATEDIN_3_0 void Camellia_decrypt(const unsigned char *in,
|
||||
unsigned char *out,
|
||||
const CAMELLIA_KEY *key);
|
||||
OSSL_DEPRECATEDIN_3_0 void Camellia_ecb_encrypt(const unsigned char *in,
|
||||
unsigned char *out,
|
||||
const CAMELLIA_KEY *key,
|
||||
int enc);
|
||||
OSSL_DEPRECATEDIN_3_0 void Camellia_cbc_encrypt(const unsigned char *in,
|
||||
unsigned char *out,
|
||||
size_t length,
|
||||
const CAMELLIA_KEY *key,
|
||||
unsigned char *ivec,
|
||||
int enc);
|
||||
OSSL_DEPRECATEDIN_3_0 void Camellia_cfb128_encrypt(const unsigned char *in,
|
||||
unsigned char *out,
|
||||
size_t length,
|
||||
const CAMELLIA_KEY *key,
|
||||
unsigned char *ivec,
|
||||
int *num,
|
||||
int enc);
|
||||
OSSL_DEPRECATEDIN_3_0 void Camellia_cfb1_encrypt(const unsigned char *in,
|
||||
unsigned char *out,
|
||||
size_t length,
|
||||
const CAMELLIA_KEY *key,
|
||||
unsigned char *ivec,
|
||||
int *num,
|
||||
int enc);
|
||||
OSSL_DEPRECATEDIN_3_0 void Camellia_cfb8_encrypt(const unsigned char *in,
|
||||
unsigned char *out,
|
||||
size_t length,
|
||||
const CAMELLIA_KEY *key,
|
||||
unsigned char *ivec,
|
||||
int *num,
|
||||
int enc);
|
||||
OSSL_DEPRECATEDIN_3_0 void Camellia_ofb128_encrypt(const unsigned char *in,
|
||||
unsigned char *out,
|
||||
size_t length,
|
||||
const CAMELLIA_KEY *key,
|
||||
unsigned char *ivec,
|
||||
int *num);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
void Camellia_ctr128_encrypt(const unsigned char *in, unsigned char *out,
|
||||
size_t length, const CAMELLIA_KEY *key,
|
||||
unsigned char ivec[CAMELLIA_BLOCK_SIZE],
|
||||
unsigned char ecount_buf[CAMELLIA_BLOCK_SIZE],
|
||||
unsigned int *num);
|
||||
size_t length, const CAMELLIA_KEY *key,
|
||||
unsigned char ivec[CAMELLIA_BLOCK_SIZE],
|
||||
unsigned char ecount_buf[CAMELLIA_BLOCK_SIZE],
|
||||
unsigned int *num);
|
||||
#endif
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,53 +1,71 @@
|
||||
/*
|
||||
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (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
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#ifndef HEADER_CAST_H
|
||||
# define HEADER_CAST_H
|
||||
#ifndef OPENSSL_CAST_H
|
||||
#define OPENSSL_CAST_H
|
||||
#pragma once
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
#include <openssl/macros.h>
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#define HEADER_CAST_H
|
||||
#endif
|
||||
|
||||
# ifndef OPENSSL_NO_CAST
|
||||
# ifdef __cplusplus
|
||||
#include <openssl/opensslconf.h>
|
||||
|
||||
#ifndef OPENSSL_NO_CAST
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# define CAST_ENCRYPT 1
|
||||
# define CAST_DECRYPT 0
|
||||
#define CAST_BLOCK 8
|
||||
#define CAST_KEY_LENGTH 16
|
||||
|
||||
# define CAST_LONG unsigned int
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
|
||||
# define CAST_BLOCK 8
|
||||
# define CAST_KEY_LENGTH 16
|
||||
#define CAST_ENCRYPT 1
|
||||
#define CAST_DECRYPT 0
|
||||
|
||||
typedef unsigned int CAST_LONG;
|
||||
|
||||
typedef struct cast_key_st {
|
||||
CAST_LONG data[32];
|
||||
int short_key; /* Use reduced rounds for short key */
|
||||
int short_key; /* Use reduced rounds for short key */
|
||||
} CAST_KEY;
|
||||
|
||||
#endif /* OPENSSL_NO_DEPRECATED_3_0 */
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
void CAST_ecb_encrypt(const unsigned char *in, unsigned char *out,
|
||||
const CAST_KEY *key, int enc);
|
||||
const CAST_KEY *key, int enc);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
void CAST_encrypt(CAST_LONG *data, const CAST_KEY *key);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
void CAST_decrypt(CAST_LONG *data, const CAST_KEY *key);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out,
|
||||
long length, const CAST_KEY *ks, unsigned char *iv,
|
||||
int enc);
|
||||
long length, const CAST_KEY *ks, unsigned char *iv,
|
||||
int enc);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
void CAST_cfb64_encrypt(const unsigned char *in, unsigned char *out,
|
||||
long length, const CAST_KEY *schedule,
|
||||
unsigned char *ivec, int *num, int enc);
|
||||
long length, const CAST_KEY *schedule,
|
||||
unsigned char *ivec, int *num, int enc);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
void CAST_ofb64_encrypt(const unsigned char *in, unsigned char *out,
|
||||
long length, const CAST_KEY *schedule,
|
||||
unsigned char *ivec, int *num);
|
||||
long length, const CAST_KEY *schedule,
|
||||
unsigned char *ivec, int *num);
|
||||
#endif
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,41 +1,53 @@
|
||||
/*
|
||||
* Copyright 2010-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 2010-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (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
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#ifndef HEADER_CMAC_H
|
||||
# define HEADER_CMAC_H
|
||||
#ifndef OPENSSL_CMAC_H
|
||||
#define OPENSSL_CMAC_H
|
||||
#pragma once
|
||||
|
||||
# ifndef OPENSSL_NO_CMAC
|
||||
#include <openssl/macros.h>
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#define HEADER_CMAC_H
|
||||
#endif
|
||||
|
||||
#ifndef OPENSSL_NO_CMAC
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
# include <openssl/evp.h>
|
||||
#include <openssl/evp.h>
|
||||
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
/* Opaque */
|
||||
typedef struct CMAC_CTX_st CMAC_CTX;
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
OSSL_DEPRECATEDIN_3_0 CMAC_CTX *CMAC_CTX_new(void);
|
||||
OSSL_DEPRECATEDIN_3_0 void CMAC_CTX_cleanup(CMAC_CTX *ctx);
|
||||
OSSL_DEPRECATEDIN_3_0 void CMAC_CTX_free(CMAC_CTX *ctx);
|
||||
OSSL_DEPRECATEDIN_3_0 EVP_CIPHER_CTX *CMAC_CTX_get0_cipher_ctx(CMAC_CTX *ctx);
|
||||
OSSL_DEPRECATEDIN_3_0 int CMAC_CTX_copy(CMAC_CTX *out, const CMAC_CTX *in);
|
||||
OSSL_DEPRECATEDIN_3_0 int CMAC_Init(CMAC_CTX *ctx,
|
||||
const void *key, size_t keylen,
|
||||
const EVP_CIPHER *cipher,
|
||||
ENGINE *impl /* must be NULL */);
|
||||
OSSL_DEPRECATEDIN_3_0 int CMAC_Update(CMAC_CTX *ctx,
|
||||
const void *data, size_t dlen);
|
||||
OSSL_DEPRECATEDIN_3_0 int CMAC_Final(CMAC_CTX *ctx,
|
||||
unsigned char *out, size_t *poutlen);
|
||||
OSSL_DEPRECATEDIN_3_0 int CMAC_resume(CMAC_CTX *ctx);
|
||||
#endif
|
||||
|
||||
CMAC_CTX *CMAC_CTX_new(void);
|
||||
void CMAC_CTX_cleanup(CMAC_CTX *ctx);
|
||||
void CMAC_CTX_free(CMAC_CTX *ctx);
|
||||
EVP_CIPHER_CTX *CMAC_CTX_get0_cipher_ctx(CMAC_CTX *ctx);
|
||||
int CMAC_CTX_copy(CMAC_CTX *out, const CMAC_CTX *in);
|
||||
|
||||
int CMAC_Init(CMAC_CTX *ctx, const void *key, size_t keylen,
|
||||
const EVP_CIPHER *cipher, ENGINE *impl);
|
||||
int CMAC_Update(CMAC_CTX *ctx, const void *data, size_t dlen);
|
||||
int CMAC_Final(CMAC_CTX *ctx, unsigned char *out, size_t *poutlen);
|
||||
int CMAC_resume(CMAC_CTX *ctx);
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* WARNING: do not edit!
|
||||
* Generated by Makefile from include/openssl/cmp.h.in
|
||||
*
|
||||
* Copyright 2007-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 2007-2026 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright Nokia 2007-2019
|
||||
* Copyright Siemens AG 2015-2019
|
||||
*
|
||||
@@ -12,30 +12,34 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
/* clang-format off */
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
#ifndef OPENSSL_CMP_H
|
||||
# define OPENSSL_CMP_H
|
||||
#define OPENSSL_CMP_H
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
# ifndef OPENSSL_NO_CMP
|
||||
#include <openssl/opensslconf.h>
|
||||
#ifndef OPENSSL_NO_CMP
|
||||
|
||||
# include <openssl/crmf.h>
|
||||
# include <openssl/cmperr.h>
|
||||
# include <openssl/cmp_util.h>
|
||||
# include <openssl/http.h>
|
||||
#include <openssl/crmf.h>
|
||||
#include <openssl/cmperr.h>
|
||||
#include <openssl/cmp_util.h>
|
||||
#include <openssl/http.h>
|
||||
|
||||
/* explicit #includes not strictly needed since implied by the above: */
|
||||
# include <openssl/types.h>
|
||||
# include <openssl/safestack.h>
|
||||
# include <openssl/x509.h>
|
||||
# include <openssl/x509v3.h>
|
||||
#include <openssl/types.h>
|
||||
#include <openssl/safestack.h>
|
||||
#include <openssl/x509.h>
|
||||
#include <openssl/x509v3.h>
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# define OSSL_CMP_PVNO 2
|
||||
#define OSSL_CMP_PVNO_2 2
|
||||
#define OSSL_CMP_PVNO_3 3
|
||||
#define OSSL_CMP_PVNO OSSL_CMP_PVNO_2 /* v2 is the default */
|
||||
|
||||
/*-
|
||||
* PKIFailureInfo ::= BIT STRING {
|
||||
@@ -104,69 +108,68 @@ extern "C" {
|
||||
* -- certificate already exists
|
||||
* }
|
||||
*/
|
||||
# define OSSL_CMP_PKIFAILUREINFO_badAlg 0
|
||||
# define OSSL_CMP_PKIFAILUREINFO_badMessageCheck 1
|
||||
# define OSSL_CMP_PKIFAILUREINFO_badRequest 2
|
||||
# define OSSL_CMP_PKIFAILUREINFO_badTime 3
|
||||
# define OSSL_CMP_PKIFAILUREINFO_badCertId 4
|
||||
# define OSSL_CMP_PKIFAILUREINFO_badDataFormat 5
|
||||
# define OSSL_CMP_PKIFAILUREINFO_wrongAuthority 6
|
||||
# define OSSL_CMP_PKIFAILUREINFO_incorrectData 7
|
||||
# define OSSL_CMP_PKIFAILUREINFO_missingTimeStamp 8
|
||||
# define OSSL_CMP_PKIFAILUREINFO_badPOP 9
|
||||
# define OSSL_CMP_PKIFAILUREINFO_certRevoked 10
|
||||
# define OSSL_CMP_PKIFAILUREINFO_certConfirmed 11
|
||||
# define OSSL_CMP_PKIFAILUREINFO_wrongIntegrity 12
|
||||
# define OSSL_CMP_PKIFAILUREINFO_badRecipientNonce 13
|
||||
# define OSSL_CMP_PKIFAILUREINFO_timeNotAvailable 14
|
||||
# define OSSL_CMP_PKIFAILUREINFO_unacceptedPolicy 15
|
||||
# define OSSL_CMP_PKIFAILUREINFO_unacceptedExtension 16
|
||||
# define OSSL_CMP_PKIFAILUREINFO_addInfoNotAvailable 17
|
||||
# define OSSL_CMP_PKIFAILUREINFO_badSenderNonce 18
|
||||
# define OSSL_CMP_PKIFAILUREINFO_badCertTemplate 19
|
||||
# define OSSL_CMP_PKIFAILUREINFO_signerNotTrusted 20
|
||||
# define OSSL_CMP_PKIFAILUREINFO_transactionIdInUse 21
|
||||
# define OSSL_CMP_PKIFAILUREINFO_unsupportedVersion 22
|
||||
# define OSSL_CMP_PKIFAILUREINFO_notAuthorized 23
|
||||
# define OSSL_CMP_PKIFAILUREINFO_systemUnavail 24
|
||||
# define OSSL_CMP_PKIFAILUREINFO_systemFailure 25
|
||||
# define OSSL_CMP_PKIFAILUREINFO_duplicateCertReq 26
|
||||
# define OSSL_CMP_PKIFAILUREINFO_MAX 26
|
||||
# define OSSL_CMP_PKIFAILUREINFO_MAX_BIT_PATTERN \
|
||||
#define OSSL_CMP_PKIFAILUREINFO_badAlg 0
|
||||
#define OSSL_CMP_PKIFAILUREINFO_badMessageCheck 1
|
||||
#define OSSL_CMP_PKIFAILUREINFO_badRequest 2
|
||||
#define OSSL_CMP_PKIFAILUREINFO_badTime 3
|
||||
#define OSSL_CMP_PKIFAILUREINFO_badCertId 4
|
||||
#define OSSL_CMP_PKIFAILUREINFO_badDataFormat 5
|
||||
#define OSSL_CMP_PKIFAILUREINFO_wrongAuthority 6
|
||||
#define OSSL_CMP_PKIFAILUREINFO_incorrectData 7
|
||||
#define OSSL_CMP_PKIFAILUREINFO_missingTimeStamp 8
|
||||
#define OSSL_CMP_PKIFAILUREINFO_badPOP 9
|
||||
#define OSSL_CMP_PKIFAILUREINFO_certRevoked 10
|
||||
#define OSSL_CMP_PKIFAILUREINFO_certConfirmed 11
|
||||
#define OSSL_CMP_PKIFAILUREINFO_wrongIntegrity 12
|
||||
#define OSSL_CMP_PKIFAILUREINFO_badRecipientNonce 13
|
||||
#define OSSL_CMP_PKIFAILUREINFO_timeNotAvailable 14
|
||||
#define OSSL_CMP_PKIFAILUREINFO_unacceptedPolicy 15
|
||||
#define OSSL_CMP_PKIFAILUREINFO_unacceptedExtension 16
|
||||
#define OSSL_CMP_PKIFAILUREINFO_addInfoNotAvailable 17
|
||||
#define OSSL_CMP_PKIFAILUREINFO_badSenderNonce 18
|
||||
#define OSSL_CMP_PKIFAILUREINFO_badCertTemplate 19
|
||||
#define OSSL_CMP_PKIFAILUREINFO_signerNotTrusted 20
|
||||
#define OSSL_CMP_PKIFAILUREINFO_transactionIdInUse 21
|
||||
#define OSSL_CMP_PKIFAILUREINFO_unsupportedVersion 22
|
||||
#define OSSL_CMP_PKIFAILUREINFO_notAuthorized 23
|
||||
#define OSSL_CMP_PKIFAILUREINFO_systemUnavail 24
|
||||
#define OSSL_CMP_PKIFAILUREINFO_systemFailure 25
|
||||
#define OSSL_CMP_PKIFAILUREINFO_duplicateCertReq 26
|
||||
#define OSSL_CMP_PKIFAILUREINFO_MAX 26
|
||||
#define OSSL_CMP_PKIFAILUREINFO_MAX_BIT_PATTERN \
|
||||
((1 << (OSSL_CMP_PKIFAILUREINFO_MAX + 1)) - 1)
|
||||
# if OSSL_CMP_PKIFAILUREINFO_MAX_BIT_PATTERN > INT_MAX
|
||||
# error CMP_PKIFAILUREINFO_MAX bit pattern does not fit in type int
|
||||
# endif
|
||||
|
||||
#if OSSL_CMP_PKIFAILUREINFO_MAX_BIT_PATTERN > INT_MAX
|
||||
#error CMP_PKIFAILUREINFO_MAX bit pattern does not fit in type int
|
||||
#endif
|
||||
typedef ASN1_BIT_STRING OSSL_CMP_PKIFAILUREINFO;
|
||||
|
||||
# define OSSL_CMP_CTX_FAILINFO_badAlg (1 << 0)
|
||||
# define OSSL_CMP_CTX_FAILINFO_badMessageCheck (1 << 1)
|
||||
# define OSSL_CMP_CTX_FAILINFO_badRequest (1 << 2)
|
||||
# define OSSL_CMP_CTX_FAILINFO_badTime (1 << 3)
|
||||
# define OSSL_CMP_CTX_FAILINFO_badCertId (1 << 4)
|
||||
# define OSSL_CMP_CTX_FAILINFO_badDataFormat (1 << 5)
|
||||
# define OSSL_CMP_CTX_FAILINFO_wrongAuthority (1 << 6)
|
||||
# define OSSL_CMP_CTX_FAILINFO_incorrectData (1 << 7)
|
||||
# define OSSL_CMP_CTX_FAILINFO_missingTimeStamp (1 << 8)
|
||||
# define OSSL_CMP_CTX_FAILINFO_badPOP (1 << 9)
|
||||
# define OSSL_CMP_CTX_FAILINFO_certRevoked (1 << 10)
|
||||
# define OSSL_CMP_CTX_FAILINFO_certConfirmed (1 << 11)
|
||||
# define OSSL_CMP_CTX_FAILINFO_wrongIntegrity (1 << 12)
|
||||
# define OSSL_CMP_CTX_FAILINFO_badRecipientNonce (1 << 13)
|
||||
# define OSSL_CMP_CTX_FAILINFO_timeNotAvailable (1 << 14)
|
||||
# define OSSL_CMP_CTX_FAILINFO_unacceptedPolicy (1 << 15)
|
||||
# define OSSL_CMP_CTX_FAILINFO_unacceptedExtension (1 << 16)
|
||||
# define OSSL_CMP_CTX_FAILINFO_addInfoNotAvailable (1 << 17)
|
||||
# define OSSL_CMP_CTX_FAILINFO_badSenderNonce (1 << 18)
|
||||
# define OSSL_CMP_CTX_FAILINFO_badCertTemplate (1 << 19)
|
||||
# define OSSL_CMP_CTX_FAILINFO_signerNotTrusted (1 << 20)
|
||||
# define OSSL_CMP_CTX_FAILINFO_transactionIdInUse (1 << 21)
|
||||
# define OSSL_CMP_CTX_FAILINFO_unsupportedVersion (1 << 22)
|
||||
# define OSSL_CMP_CTX_FAILINFO_notAuthorized (1 << 23)
|
||||
# define OSSL_CMP_CTX_FAILINFO_systemUnavail (1 << 24)
|
||||
# define OSSL_CMP_CTX_FAILINFO_systemFailure (1 << 25)
|
||||
# define OSSL_CMP_CTX_FAILINFO_duplicateCertReq (1 << 26)
|
||||
#define OSSL_CMP_CTX_FAILINFO_badAlg (1 << 0)
|
||||
#define OSSL_CMP_CTX_FAILINFO_badMessageCheck (1 << 1)
|
||||
#define OSSL_CMP_CTX_FAILINFO_badRequest (1 << 2)
|
||||
#define OSSL_CMP_CTX_FAILINFO_badTime (1 << 3)
|
||||
#define OSSL_CMP_CTX_FAILINFO_badCertId (1 << 4)
|
||||
#define OSSL_CMP_CTX_FAILINFO_badDataFormat (1 << 5)
|
||||
#define OSSL_CMP_CTX_FAILINFO_wrongAuthority (1 << 6)
|
||||
#define OSSL_CMP_CTX_FAILINFO_incorrectData (1 << 7)
|
||||
#define OSSL_CMP_CTX_FAILINFO_missingTimeStamp (1 << 8)
|
||||
#define OSSL_CMP_CTX_FAILINFO_badPOP (1 << 9)
|
||||
#define OSSL_CMP_CTX_FAILINFO_certRevoked (1 << 10)
|
||||
#define OSSL_CMP_CTX_FAILINFO_certConfirmed (1 << 11)
|
||||
#define OSSL_CMP_CTX_FAILINFO_wrongIntegrity (1 << 12)
|
||||
#define OSSL_CMP_CTX_FAILINFO_badRecipientNonce (1 << 13)
|
||||
#define OSSL_CMP_CTX_FAILINFO_timeNotAvailable (1 << 14)
|
||||
#define OSSL_CMP_CTX_FAILINFO_unacceptedPolicy (1 << 15)
|
||||
#define OSSL_CMP_CTX_FAILINFO_unacceptedExtension (1 << 16)
|
||||
#define OSSL_CMP_CTX_FAILINFO_addInfoNotAvailable (1 << 17)
|
||||
#define OSSL_CMP_CTX_FAILINFO_badSenderNonce (1 << 18)
|
||||
#define OSSL_CMP_CTX_FAILINFO_badCertTemplate (1 << 19)
|
||||
#define OSSL_CMP_CTX_FAILINFO_signerNotTrusted (1 << 20)
|
||||
#define OSSL_CMP_CTX_FAILINFO_transactionIdInUse (1 << 21)
|
||||
#define OSSL_CMP_CTX_FAILINFO_unsupportedVersion (1 << 22)
|
||||
#define OSSL_CMP_CTX_FAILINFO_notAuthorized (1 << 23)
|
||||
#define OSSL_CMP_CTX_FAILINFO_systemUnavail (1 << 24)
|
||||
#define OSSL_CMP_CTX_FAILINFO_systemFailure (1 << 25)
|
||||
#define OSSL_CMP_CTX_FAILINFO_duplicateCertReq (1 << 26)
|
||||
|
||||
/*-
|
||||
* PKIStatus ::= INTEGER {
|
||||
@@ -193,19 +196,24 @@ typedef ASN1_BIT_STRING OSSL_CMP_PKIFAILUREINFO;
|
||||
* -- CertReqMsg
|
||||
* }
|
||||
*/
|
||||
# define OSSL_CMP_PKISTATUS_accepted 0
|
||||
# define OSSL_CMP_PKISTATUS_grantedWithMods 1
|
||||
# define OSSL_CMP_PKISTATUS_rejection 2
|
||||
# define OSSL_CMP_PKISTATUS_waiting 3
|
||||
# define OSSL_CMP_PKISTATUS_revocationWarning 4
|
||||
# define OSSL_CMP_PKISTATUS_revocationNotification 5
|
||||
# define OSSL_CMP_PKISTATUS_keyUpdateWarning 6
|
||||
|
||||
#define OSSL_CMP_PKISTATUS_rejected_by_client -5
|
||||
#define OSSL_CMP_PKISTATUS_checking_response -4
|
||||
#define OSSL_CMP_PKISTATUS_request -3
|
||||
#define OSSL_CMP_PKISTATUS_trans -2
|
||||
#define OSSL_CMP_PKISTATUS_unspecified -1
|
||||
#define OSSL_CMP_PKISTATUS_accepted 0
|
||||
#define OSSL_CMP_PKISTATUS_grantedWithMods 1
|
||||
#define OSSL_CMP_PKISTATUS_rejection 2
|
||||
#define OSSL_CMP_PKISTATUS_waiting 3
|
||||
#define OSSL_CMP_PKISTATUS_revocationWarning 4
|
||||
#define OSSL_CMP_PKISTATUS_revocationNotification 5
|
||||
#define OSSL_CMP_PKISTATUS_keyUpdateWarning 6
|
||||
typedef ASN1_INTEGER OSSL_CMP_PKISTATUS;
|
||||
|
||||
DECLARE_ASN1_ITEM(OSSL_CMP_PKISTATUS)
|
||||
|
||||
# define OSSL_CMP_CERTORENCCERT_CERTIFICATE 0
|
||||
# define OSSL_CMP_CERTORENCCERT_ENCRYPTEDCERT 1
|
||||
#define OSSL_CMP_CERTORENCCERT_CERTIFICATE 0
|
||||
#define OSSL_CMP_CERTORENCCERT_ENCRYPTEDCERT 1
|
||||
|
||||
/* data type declarations */
|
||||
typedef struct ossl_cmp_ctx_st OSSL_CMP_CTX;
|
||||
@@ -215,12 +223,13 @@ typedef struct ossl_cmp_msg_st OSSL_CMP_MSG;
|
||||
DECLARE_ASN1_DUP_FUNCTION(OSSL_CMP_MSG)
|
||||
DECLARE_ASN1_ENCODE_FUNCTIONS(OSSL_CMP_MSG, OSSL_CMP_MSG, OSSL_CMP_MSG)
|
||||
typedef struct ossl_cmp_certstatus_st OSSL_CMP_CERTSTATUS;
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_CERTSTATUS, OSSL_CMP_CERTSTATUS, OSSL_CMP_CERTSTATUS)
|
||||
#define sk_OSSL_CMP_CERTSTATUS_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_CERTSTATUS_sk_type(sk))
|
||||
#define sk_OSSL_CMP_CERTSTATUS_value(sk, idx) ((OSSL_CMP_CERTSTATUS *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_CERTSTATUS_sk_type(sk), (idx)))
|
||||
#define sk_OSSL_CMP_CERTSTATUS_new(cmp) ((STACK_OF(OSSL_CMP_CERTSTATUS) *)OPENSSL_sk_new(ossl_check_OSSL_CMP_CERTSTATUS_compfunc_type(cmp)))
|
||||
#define sk_OSSL_CMP_CERTSTATUS_new_null() ((STACK_OF(OSSL_CMP_CERTSTATUS) *)OPENSSL_sk_new_null())
|
||||
#define sk_OSSL_CMP_CERTSTATUS_new_reserve(cmp, n) ((STACK_OF(OSSL_CMP_CERTSTATUS) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CMP_CERTSTATUS_compfunc_type(cmp), (n)))
|
||||
#define sk_OSSL_CMP_CERTSTATUS_new(cmp) ((STACK_OF(OSSL_CMP_CERTSTATUS) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new(ossl_check_OSSL_CMP_CERTSTATUS_compfunc_type(cmp)), sk_OSSL_CMP_CERTSTATUS_cmpfunc_thunk))
|
||||
#define sk_OSSL_CMP_CERTSTATUS_new_null() ((STACK_OF(OSSL_CMP_CERTSTATUS) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_OSSL_CMP_CERTSTATUS_freefunc_thunk))
|
||||
#define sk_OSSL_CMP_CERTSTATUS_new_reserve(cmp, n) ((STACK_OF(OSSL_CMP_CERTSTATUS) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new_reserve(ossl_check_OSSL_CMP_CERTSTATUS_compfunc_type(cmp), (n)), sk_OSSL_CMP_CERTSTATUS_cmpfunc_thunk))
|
||||
#define sk_OSSL_CMP_CERTSTATUS_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), (n))
|
||||
#define sk_OSSL_CMP_CERTSTATUS_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk))
|
||||
#define sk_OSSL_CMP_CERTSTATUS_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk))
|
||||
@@ -230,7 +239,7 @@ SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_CERTSTATUS, OSSL_CMP_CERTSTATUS, OSSL_CMP_
|
||||
#define sk_OSSL_CMP_CERTSTATUS_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_type(ptr))
|
||||
#define sk_OSSL_CMP_CERTSTATUS_pop(sk) ((OSSL_CMP_CERTSTATUS *)OPENSSL_sk_pop(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk)))
|
||||
#define sk_OSSL_CMP_CERTSTATUS_shift(sk) ((OSSL_CMP_CERTSTATUS *)OPENSSL_sk_shift(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk)))
|
||||
#define sk_OSSL_CMP_CERTSTATUS_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk),ossl_check_OSSL_CMP_CERTSTATUS_freefunc_type(freefunc))
|
||||
#define sk_OSSL_CMP_CERTSTATUS_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_freefunc_type(freefunc))
|
||||
#define sk_OSSL_CMP_CERTSTATUS_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_type(ptr), (idx))
|
||||
#define sk_OSSL_CMP_CERTSTATUS_set(sk, idx, ptr) ((OSSL_CMP_CERTSTATUS *)OPENSSL_sk_set(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), (idx), ossl_check_OSSL_CMP_CERTSTATUS_type(ptr)))
|
||||
#define sk_OSSL_CMP_CERTSTATUS_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_type(ptr))
|
||||
@@ -242,14 +251,16 @@ SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_CERTSTATUS, OSSL_CMP_CERTSTATUS, OSSL_CMP_
|
||||
#define sk_OSSL_CMP_CERTSTATUS_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CMP_CERTSTATUS) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_copyfunc_type(copyfunc), ossl_check_OSSL_CMP_CERTSTATUS_freefunc_type(freefunc)))
|
||||
#define sk_OSSL_CMP_CERTSTATUS_set_cmp_func(sk, cmp) ((sk_OSSL_CMP_CERTSTATUS_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_compfunc_type(cmp)))
|
||||
|
||||
/* clang-format on */
|
||||
typedef struct ossl_cmp_itav_st OSSL_CMP_ITAV;
|
||||
DECLARE_ASN1_DUP_FUNCTION(OSSL_CMP_ITAV)
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_ITAV, OSSL_CMP_ITAV, OSSL_CMP_ITAV)
|
||||
#define sk_OSSL_CMP_ITAV_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_ITAV_sk_type(sk))
|
||||
#define sk_OSSL_CMP_ITAV_value(sk, idx) ((OSSL_CMP_ITAV *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_ITAV_sk_type(sk), (idx)))
|
||||
#define sk_OSSL_CMP_ITAV_new(cmp) ((STACK_OF(OSSL_CMP_ITAV) *)OPENSSL_sk_new(ossl_check_OSSL_CMP_ITAV_compfunc_type(cmp)))
|
||||
#define sk_OSSL_CMP_ITAV_new_null() ((STACK_OF(OSSL_CMP_ITAV) *)OPENSSL_sk_new_null())
|
||||
#define sk_OSSL_CMP_ITAV_new_reserve(cmp, n) ((STACK_OF(OSSL_CMP_ITAV) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CMP_ITAV_compfunc_type(cmp), (n)))
|
||||
#define sk_OSSL_CMP_ITAV_new(cmp) ((STACK_OF(OSSL_CMP_ITAV) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new(ossl_check_OSSL_CMP_ITAV_compfunc_type(cmp)), sk_OSSL_CMP_ITAV_cmpfunc_thunk))
|
||||
#define sk_OSSL_CMP_ITAV_new_null() ((STACK_OF(OSSL_CMP_ITAV) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_OSSL_CMP_ITAV_freefunc_thunk))
|
||||
#define sk_OSSL_CMP_ITAV_new_reserve(cmp, n) ((STACK_OF(OSSL_CMP_ITAV) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new_reserve(ossl_check_OSSL_CMP_ITAV_compfunc_type(cmp), (n)), sk_OSSL_CMP_ITAV_cmpfunc_thunk))
|
||||
#define sk_OSSL_CMP_ITAV_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CMP_ITAV_sk_type(sk), (n))
|
||||
#define sk_OSSL_CMP_ITAV_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CMP_ITAV_sk_type(sk))
|
||||
#define sk_OSSL_CMP_ITAV_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CMP_ITAV_sk_type(sk))
|
||||
@@ -259,7 +270,7 @@ SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_ITAV, OSSL_CMP_ITAV, OSSL_CMP_ITAV)
|
||||
#define sk_OSSL_CMP_ITAV_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_type(ptr))
|
||||
#define sk_OSSL_CMP_ITAV_pop(sk) ((OSSL_CMP_ITAV *)OPENSSL_sk_pop(ossl_check_OSSL_CMP_ITAV_sk_type(sk)))
|
||||
#define sk_OSSL_CMP_ITAV_shift(sk) ((OSSL_CMP_ITAV *)OPENSSL_sk_shift(ossl_check_OSSL_CMP_ITAV_sk_type(sk)))
|
||||
#define sk_OSSL_CMP_ITAV_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CMP_ITAV_sk_type(sk),ossl_check_OSSL_CMP_ITAV_freefunc_type(freefunc))
|
||||
#define sk_OSSL_CMP_ITAV_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_freefunc_type(freefunc))
|
||||
#define sk_OSSL_CMP_ITAV_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_type(ptr), (idx))
|
||||
#define sk_OSSL_CMP_ITAV_set(sk, idx, ptr) ((OSSL_CMP_ITAV *)OPENSSL_sk_set(ossl_check_OSSL_CMP_ITAV_sk_type(sk), (idx), ossl_check_OSSL_CMP_ITAV_type(ptr)))
|
||||
#define sk_OSSL_CMP_ITAV_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_type(ptr))
|
||||
@@ -271,16 +282,60 @@ SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_ITAV, OSSL_CMP_ITAV, OSSL_CMP_ITAV)
|
||||
#define sk_OSSL_CMP_ITAV_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CMP_ITAV) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_copyfunc_type(copyfunc), ossl_check_OSSL_CMP_ITAV_freefunc_type(freefunc)))
|
||||
#define sk_OSSL_CMP_ITAV_set_cmp_func(sk, cmp) ((sk_OSSL_CMP_ITAV_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_compfunc_type(cmp)))
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
typedef struct ossl_cmp_crlstatus_st OSSL_CMP_CRLSTATUS;
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_CRLSTATUS, OSSL_CMP_CRLSTATUS, OSSL_CMP_CRLSTATUS)
|
||||
#define sk_OSSL_CMP_CRLSTATUS_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_CRLSTATUS_sk_type(sk))
|
||||
#define sk_OSSL_CMP_CRLSTATUS_value(sk, idx) ((OSSL_CMP_CRLSTATUS *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_CRLSTATUS_sk_type(sk), (idx)))
|
||||
#define sk_OSSL_CMP_CRLSTATUS_new(cmp) ((STACK_OF(OSSL_CMP_CRLSTATUS) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new(ossl_check_OSSL_CMP_CRLSTATUS_compfunc_type(cmp)), sk_OSSL_CMP_CRLSTATUS_cmpfunc_thunk))
|
||||
#define sk_OSSL_CMP_CRLSTATUS_new_null() ((STACK_OF(OSSL_CMP_CRLSTATUS) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_OSSL_CMP_CRLSTATUS_freefunc_thunk))
|
||||
#define sk_OSSL_CMP_CRLSTATUS_new_reserve(cmp, n) ((STACK_OF(OSSL_CMP_CRLSTATUS) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new_reserve(ossl_check_OSSL_CMP_CRLSTATUS_compfunc_type(cmp), (n)), sk_OSSL_CMP_CRLSTATUS_cmpfunc_thunk))
|
||||
#define sk_OSSL_CMP_CRLSTATUS_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), (n))
|
||||
#define sk_OSSL_CMP_CRLSTATUS_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk))
|
||||
#define sk_OSSL_CMP_CRLSTATUS_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk))
|
||||
#define sk_OSSL_CMP_CRLSTATUS_delete(sk, i) ((OSSL_CMP_CRLSTATUS *)OPENSSL_sk_delete(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), (i)))
|
||||
#define sk_OSSL_CMP_CRLSTATUS_delete_ptr(sk, ptr) ((OSSL_CMP_CRLSTATUS *)OPENSSL_sk_delete_ptr(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr)))
|
||||
#define sk_OSSL_CMP_CRLSTATUS_push(sk, ptr) OPENSSL_sk_push(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr))
|
||||
#define sk_OSSL_CMP_CRLSTATUS_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr))
|
||||
#define sk_OSSL_CMP_CRLSTATUS_pop(sk) ((OSSL_CMP_CRLSTATUS *)OPENSSL_sk_pop(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk)))
|
||||
#define sk_OSSL_CMP_CRLSTATUS_shift(sk) ((OSSL_CMP_CRLSTATUS *)OPENSSL_sk_shift(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk)))
|
||||
#define sk_OSSL_CMP_CRLSTATUS_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_freefunc_type(freefunc))
|
||||
#define sk_OSSL_CMP_CRLSTATUS_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr), (idx))
|
||||
#define sk_OSSL_CMP_CRLSTATUS_set(sk, idx, ptr) ((OSSL_CMP_CRLSTATUS *)OPENSSL_sk_set(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), (idx), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr)))
|
||||
#define sk_OSSL_CMP_CRLSTATUS_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr))
|
||||
#define sk_OSSL_CMP_CRLSTATUS_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr))
|
||||
#define sk_OSSL_CMP_CRLSTATUS_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr), pnum)
|
||||
#define sk_OSSL_CMP_CRLSTATUS_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk))
|
||||
#define sk_OSSL_CMP_CRLSTATUS_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CMP_CRLSTATUS_sk_type(sk))
|
||||
#define sk_OSSL_CMP_CRLSTATUS_dup(sk) ((STACK_OF(OSSL_CMP_CRLSTATUS) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CMP_CRLSTATUS_sk_type(sk)))
|
||||
#define sk_OSSL_CMP_CRLSTATUS_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CMP_CRLSTATUS) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_copyfunc_type(copyfunc), ossl_check_OSSL_CMP_CRLSTATUS_freefunc_type(freefunc)))
|
||||
#define sk_OSSL_CMP_CRLSTATUS_set_cmp_func(sk, cmp) ((sk_OSSL_CMP_CRLSTATUS_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_compfunc_type(cmp)))
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
typedef OSSL_CRMF_ATTRIBUTETYPEANDVALUE OSSL_CMP_ATAV;
|
||||
#define OSSL_CMP_ATAV_free OSSL_CRMF_ATTRIBUTETYPEANDVALUE_free
|
||||
typedef STACK_OF(OSSL_CRMF_ATTRIBUTETYPEANDVALUE) OSSL_CMP_ATAVS;
|
||||
DECLARE_ASN1_FUNCTIONS(OSSL_CMP_ATAVS)
|
||||
#define stack_st_OSSL_CMP_ATAV stack_st_OSSL_CRMF_ATTRIBUTETYPEANDVALUE
|
||||
#define sk_OSSL_CMP_ATAV_num sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_num
|
||||
#define sk_OSSL_CMP_ATAV_value sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_value
|
||||
#define sk_OSSL_CMP_ATAV_push sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_push
|
||||
#define sk_OSSL_CMP_ATAV_pop_free sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_pop_free
|
||||
|
||||
typedef struct ossl_cmp_revrepcontent_st OSSL_CMP_REVREPCONTENT;
|
||||
typedef struct ossl_cmp_pkisi_st OSSL_CMP_PKISI;
|
||||
DECLARE_ASN1_FUNCTIONS(OSSL_CMP_PKISI)
|
||||
DECLARE_ASN1_DUP_FUNCTION(OSSL_CMP_PKISI)
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_PKISI, OSSL_CMP_PKISI, OSSL_CMP_PKISI)
|
||||
#define sk_OSSL_CMP_PKISI_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_PKISI_sk_type(sk))
|
||||
#define sk_OSSL_CMP_PKISI_value(sk, idx) ((OSSL_CMP_PKISI *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_PKISI_sk_type(sk), (idx)))
|
||||
#define sk_OSSL_CMP_PKISI_new(cmp) ((STACK_OF(OSSL_CMP_PKISI) *)OPENSSL_sk_new(ossl_check_OSSL_CMP_PKISI_compfunc_type(cmp)))
|
||||
#define sk_OSSL_CMP_PKISI_new_null() ((STACK_OF(OSSL_CMP_PKISI) *)OPENSSL_sk_new_null())
|
||||
#define sk_OSSL_CMP_PKISI_new_reserve(cmp, n) ((STACK_OF(OSSL_CMP_PKISI) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CMP_PKISI_compfunc_type(cmp), (n)))
|
||||
#define sk_OSSL_CMP_PKISI_new(cmp) ((STACK_OF(OSSL_CMP_PKISI) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new(ossl_check_OSSL_CMP_PKISI_compfunc_type(cmp)), sk_OSSL_CMP_PKISI_cmpfunc_thunk))
|
||||
#define sk_OSSL_CMP_PKISI_new_null() ((STACK_OF(OSSL_CMP_PKISI) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_OSSL_CMP_PKISI_freefunc_thunk))
|
||||
#define sk_OSSL_CMP_PKISI_new_reserve(cmp, n) ((STACK_OF(OSSL_CMP_PKISI) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new_reserve(ossl_check_OSSL_CMP_PKISI_compfunc_type(cmp), (n)), sk_OSSL_CMP_PKISI_cmpfunc_thunk))
|
||||
#define sk_OSSL_CMP_PKISI_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CMP_PKISI_sk_type(sk), (n))
|
||||
#define sk_OSSL_CMP_PKISI_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CMP_PKISI_sk_type(sk))
|
||||
#define sk_OSSL_CMP_PKISI_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CMP_PKISI_sk_type(sk))
|
||||
@@ -290,7 +345,7 @@ SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_PKISI, OSSL_CMP_PKISI, OSSL_CMP_PKISI)
|
||||
#define sk_OSSL_CMP_PKISI_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_type(ptr))
|
||||
#define sk_OSSL_CMP_PKISI_pop(sk) ((OSSL_CMP_PKISI *)OPENSSL_sk_pop(ossl_check_OSSL_CMP_PKISI_sk_type(sk)))
|
||||
#define sk_OSSL_CMP_PKISI_shift(sk) ((OSSL_CMP_PKISI *)OPENSSL_sk_shift(ossl_check_OSSL_CMP_PKISI_sk_type(sk)))
|
||||
#define sk_OSSL_CMP_PKISI_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CMP_PKISI_sk_type(sk),ossl_check_OSSL_CMP_PKISI_freefunc_type(freefunc))
|
||||
#define sk_OSSL_CMP_PKISI_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_freefunc_type(freefunc))
|
||||
#define sk_OSSL_CMP_PKISI_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_type(ptr), (idx))
|
||||
#define sk_OSSL_CMP_PKISI_set(sk, idx, ptr) ((OSSL_CMP_PKISI *)OPENSSL_sk_set(ossl_check_OSSL_CMP_PKISI_sk_type(sk), (idx), ossl_check_OSSL_CMP_PKISI_type(ptr)))
|
||||
#define sk_OSSL_CMP_PKISI_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_type(ptr))
|
||||
@@ -302,13 +357,15 @@ SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_PKISI, OSSL_CMP_PKISI, OSSL_CMP_PKISI)
|
||||
#define sk_OSSL_CMP_PKISI_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CMP_PKISI) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_copyfunc_type(copyfunc), ossl_check_OSSL_CMP_PKISI_freefunc_type(freefunc)))
|
||||
#define sk_OSSL_CMP_PKISI_set_cmp_func(sk, cmp) ((sk_OSSL_CMP_PKISI_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_compfunc_type(cmp)))
|
||||
|
||||
/* clang-format on */
|
||||
typedef struct ossl_cmp_certrepmessage_st OSSL_CMP_CERTREPMESSAGE;
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_CERTREPMESSAGE, OSSL_CMP_CERTREPMESSAGE, OSSL_CMP_CERTREPMESSAGE)
|
||||
#define sk_OSSL_CMP_CERTREPMESSAGE_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_CERTREPMESSAGE_sk_type(sk))
|
||||
#define sk_OSSL_CMP_CERTREPMESSAGE_value(sk, idx) ((OSSL_CMP_CERTREPMESSAGE *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), (idx)))
|
||||
#define sk_OSSL_CMP_CERTREPMESSAGE_new(cmp) ((STACK_OF(OSSL_CMP_CERTREPMESSAGE) *)OPENSSL_sk_new(ossl_check_OSSL_CMP_CERTREPMESSAGE_compfunc_type(cmp)))
|
||||
#define sk_OSSL_CMP_CERTREPMESSAGE_new_null() ((STACK_OF(OSSL_CMP_CERTREPMESSAGE) *)OPENSSL_sk_new_null())
|
||||
#define sk_OSSL_CMP_CERTREPMESSAGE_new_reserve(cmp, n) ((STACK_OF(OSSL_CMP_CERTREPMESSAGE) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CMP_CERTREPMESSAGE_compfunc_type(cmp), (n)))
|
||||
#define sk_OSSL_CMP_CERTREPMESSAGE_new(cmp) ((STACK_OF(OSSL_CMP_CERTREPMESSAGE) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new(ossl_check_OSSL_CMP_CERTREPMESSAGE_compfunc_type(cmp)), sk_OSSL_CMP_CERTREPMESSAGE_cmpfunc_thunk))
|
||||
#define sk_OSSL_CMP_CERTREPMESSAGE_new_null() ((STACK_OF(OSSL_CMP_CERTREPMESSAGE) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_OSSL_CMP_CERTREPMESSAGE_freefunc_thunk))
|
||||
#define sk_OSSL_CMP_CERTREPMESSAGE_new_reserve(cmp, n) ((STACK_OF(OSSL_CMP_CERTREPMESSAGE) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new_reserve(ossl_check_OSSL_CMP_CERTREPMESSAGE_compfunc_type(cmp), (n)), sk_OSSL_CMP_CERTREPMESSAGE_cmpfunc_thunk))
|
||||
#define sk_OSSL_CMP_CERTREPMESSAGE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), (n))
|
||||
#define sk_OSSL_CMP_CERTREPMESSAGE_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk))
|
||||
#define sk_OSSL_CMP_CERTREPMESSAGE_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk))
|
||||
@@ -318,7 +375,7 @@ SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_CERTREPMESSAGE, OSSL_CMP_CERTREPMESSAGE, O
|
||||
#define sk_OSSL_CMP_CERTREPMESSAGE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_type(ptr))
|
||||
#define sk_OSSL_CMP_CERTREPMESSAGE_pop(sk) ((OSSL_CMP_CERTREPMESSAGE *)OPENSSL_sk_pop(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk)))
|
||||
#define sk_OSSL_CMP_CERTREPMESSAGE_shift(sk) ((OSSL_CMP_CERTREPMESSAGE *)OPENSSL_sk_shift(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk)))
|
||||
#define sk_OSSL_CMP_CERTREPMESSAGE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk),ossl_check_OSSL_CMP_CERTREPMESSAGE_freefunc_type(freefunc))
|
||||
#define sk_OSSL_CMP_CERTREPMESSAGE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_freefunc_type(freefunc))
|
||||
#define sk_OSSL_CMP_CERTREPMESSAGE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_type(ptr), (idx))
|
||||
#define sk_OSSL_CMP_CERTREPMESSAGE_set(sk, idx, ptr) ((OSSL_CMP_CERTREPMESSAGE *)OPENSSL_sk_set(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), (idx), ossl_check_OSSL_CMP_CERTREPMESSAGE_type(ptr)))
|
||||
#define sk_OSSL_CMP_CERTREPMESSAGE_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_type(ptr))
|
||||
@@ -330,15 +387,17 @@ SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_CERTREPMESSAGE, OSSL_CMP_CERTREPMESSAGE, O
|
||||
#define sk_OSSL_CMP_CERTREPMESSAGE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CMP_CERTREPMESSAGE) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_copyfunc_type(copyfunc), ossl_check_OSSL_CMP_CERTREPMESSAGE_freefunc_type(freefunc)))
|
||||
#define sk_OSSL_CMP_CERTREPMESSAGE_set_cmp_func(sk, cmp) ((sk_OSSL_CMP_CERTREPMESSAGE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_compfunc_type(cmp)))
|
||||
|
||||
/* clang-format on */
|
||||
typedef struct ossl_cmp_pollrep_st OSSL_CMP_POLLREP;
|
||||
typedef STACK_OF(OSSL_CMP_POLLREP) OSSL_CMP_POLLREPCONTENT;
|
||||
typedef struct ossl_cmp_certresponse_st OSSL_CMP_CERTRESPONSE;
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_CERTRESPONSE, OSSL_CMP_CERTRESPONSE, OSSL_CMP_CERTRESPONSE)
|
||||
#define sk_OSSL_CMP_CERTRESPONSE_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_CERTRESPONSE_sk_type(sk))
|
||||
#define sk_OSSL_CMP_CERTRESPONSE_value(sk, idx) ((OSSL_CMP_CERTRESPONSE *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_CERTRESPONSE_sk_type(sk), (idx)))
|
||||
#define sk_OSSL_CMP_CERTRESPONSE_new(cmp) ((STACK_OF(OSSL_CMP_CERTRESPONSE) *)OPENSSL_sk_new(ossl_check_OSSL_CMP_CERTRESPONSE_compfunc_type(cmp)))
|
||||
#define sk_OSSL_CMP_CERTRESPONSE_new_null() ((STACK_OF(OSSL_CMP_CERTRESPONSE) *)OPENSSL_sk_new_null())
|
||||
#define sk_OSSL_CMP_CERTRESPONSE_new_reserve(cmp, n) ((STACK_OF(OSSL_CMP_CERTRESPONSE) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CMP_CERTRESPONSE_compfunc_type(cmp), (n)))
|
||||
#define sk_OSSL_CMP_CERTRESPONSE_new(cmp) ((STACK_OF(OSSL_CMP_CERTRESPONSE) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new(ossl_check_OSSL_CMP_CERTRESPONSE_compfunc_type(cmp)), sk_OSSL_CMP_CERTRESPONSE_cmpfunc_thunk))
|
||||
#define sk_OSSL_CMP_CERTRESPONSE_new_null() ((STACK_OF(OSSL_CMP_CERTRESPONSE) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_OSSL_CMP_CERTRESPONSE_freefunc_thunk))
|
||||
#define sk_OSSL_CMP_CERTRESPONSE_new_reserve(cmp, n) ((STACK_OF(OSSL_CMP_CERTRESPONSE) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new_reserve(ossl_check_OSSL_CMP_CERTRESPONSE_compfunc_type(cmp), (n)), sk_OSSL_CMP_CERTRESPONSE_cmpfunc_thunk))
|
||||
#define sk_OSSL_CMP_CERTRESPONSE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), (n))
|
||||
#define sk_OSSL_CMP_CERTRESPONSE_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk))
|
||||
#define sk_OSSL_CMP_CERTRESPONSE_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk))
|
||||
@@ -348,7 +407,7 @@ SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_CERTRESPONSE, OSSL_CMP_CERTRESPONSE, OSSL_
|
||||
#define sk_OSSL_CMP_CERTRESPONSE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_type(ptr))
|
||||
#define sk_OSSL_CMP_CERTRESPONSE_pop(sk) ((OSSL_CMP_CERTRESPONSE *)OPENSSL_sk_pop(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk)))
|
||||
#define sk_OSSL_CMP_CERTRESPONSE_shift(sk) ((OSSL_CMP_CERTRESPONSE *)OPENSSL_sk_shift(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk)))
|
||||
#define sk_OSSL_CMP_CERTRESPONSE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk),ossl_check_OSSL_CMP_CERTRESPONSE_freefunc_type(freefunc))
|
||||
#define sk_OSSL_CMP_CERTRESPONSE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_freefunc_type(freefunc))
|
||||
#define sk_OSSL_CMP_CERTRESPONSE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_type(ptr), (idx))
|
||||
#define sk_OSSL_CMP_CERTRESPONSE_set(sk, idx, ptr) ((OSSL_CMP_CERTRESPONSE *)OPENSSL_sk_set(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), (idx), ossl_check_OSSL_CMP_CERTRESPONSE_type(ptr)))
|
||||
#define sk_OSSL_CMP_CERTRESPONSE_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_type(ptr))
|
||||
@@ -360,6 +419,7 @@ SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_CERTRESPONSE, OSSL_CMP_CERTRESPONSE, OSSL_
|
||||
#define sk_OSSL_CMP_CERTRESPONSE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CMP_CERTRESPONSE) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_copyfunc_type(copyfunc), ossl_check_OSSL_CMP_CERTRESPONSE_freefunc_type(freefunc)))
|
||||
#define sk_OSSL_CMP_CERTRESPONSE_set_cmp_func(sk, cmp) ((sk_OSSL_CMP_CERTRESPONSE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_compfunc_type(cmp)))
|
||||
|
||||
/* clang-format on */
|
||||
typedef STACK_OF(ASN1_UTF8STRING) OSSL_CMP_PKIFREETEXT;
|
||||
|
||||
/*
|
||||
@@ -369,46 +429,101 @@ typedef STACK_OF(ASN1_UTF8STRING) OSSL_CMP_PKIFREETEXT;
|
||||
/* from cmp_asn.c */
|
||||
OSSL_CMP_ITAV *OSSL_CMP_ITAV_create(ASN1_OBJECT *type, ASN1_TYPE *value);
|
||||
void OSSL_CMP_ITAV_set0(OSSL_CMP_ITAV *itav, ASN1_OBJECT *type,
|
||||
ASN1_TYPE *value);
|
||||
ASN1_TYPE *value);
|
||||
ASN1_OBJECT *OSSL_CMP_ITAV_get0_type(const OSSL_CMP_ITAV *itav);
|
||||
ASN1_TYPE *OSSL_CMP_ITAV_get0_value(const OSSL_CMP_ITAV *itav);
|
||||
int OSSL_CMP_ITAV_push0_stack_item(STACK_OF(OSSL_CMP_ITAV) **itav_sk_p,
|
||||
OSSL_CMP_ITAV *itav);
|
||||
int OSSL_CMP_ITAV_push0_stack_item(STACK_OF(OSSL_CMP_ITAV) **sk_p,
|
||||
OSSL_CMP_ITAV *itav);
|
||||
void OSSL_CMP_ITAV_free(OSSL_CMP_ITAV *itav);
|
||||
|
||||
OSSL_CMP_ITAV *OSSL_CMP_ITAV_new0_certProfile(STACK_OF(ASN1_UTF8STRING)
|
||||
*certProfile);
|
||||
int OSSL_CMP_ITAV_get0_certProfile(const OSSL_CMP_ITAV *itav,
|
||||
STACK_OF(ASN1_UTF8STRING) **out);
|
||||
OSSL_CMP_ITAV *OSSL_CMP_ITAV_new_caCerts(const STACK_OF(X509) *caCerts);
|
||||
int OSSL_CMP_ITAV_get0_caCerts(const OSSL_CMP_ITAV *itav, STACK_OF(X509) **out);
|
||||
|
||||
OSSL_CMP_ITAV *OSSL_CMP_ITAV_new_rootCaCert(const X509 *rootCaCert);
|
||||
int OSSL_CMP_ITAV_get0_rootCaCert(const OSSL_CMP_ITAV *itav, X509 **out);
|
||||
OSSL_CMP_ITAV *OSSL_CMP_ITAV_new_rootCaKeyUpdate(const X509 *newWithNew,
|
||||
const X509 *newWithOld,
|
||||
const X509 *oldWithNew);
|
||||
int OSSL_CMP_ITAV_get0_rootCaKeyUpdate(const OSSL_CMP_ITAV *itav,
|
||||
X509 **newWithNew,
|
||||
X509 **newWithOld,
|
||||
X509 **oldWithNew);
|
||||
|
||||
OSSL_CMP_CRLSTATUS *OSSL_CMP_CRLSTATUS_create(const X509_CRL *crl,
|
||||
const X509 *cert, int only_DN);
|
||||
OSSL_CMP_CRLSTATUS *OSSL_CMP_CRLSTATUS_new1(const DIST_POINT_NAME *dpn,
|
||||
const GENERAL_NAMES *issuer,
|
||||
const ASN1_TIME *thisUpdate);
|
||||
int OSSL_CMP_CRLSTATUS_get0(const OSSL_CMP_CRLSTATUS *crlstatus,
|
||||
DIST_POINT_NAME **dpn, GENERAL_NAMES **issuer,
|
||||
ASN1_TIME **thisUpdate);
|
||||
void OSSL_CMP_CRLSTATUS_free(OSSL_CMP_CRLSTATUS *crlstatus);
|
||||
OSSL_CMP_ITAV
|
||||
*OSSL_CMP_ITAV_new0_crlStatusList(STACK_OF(OSSL_CMP_CRLSTATUS) *crlStatusList);
|
||||
int OSSL_CMP_ITAV_get0_crlStatusList(const OSSL_CMP_ITAV *itav,
|
||||
STACK_OF(OSSL_CMP_CRLSTATUS) **out);
|
||||
OSSL_CMP_ITAV *OSSL_CMP_ITAV_new_crls(const X509_CRL *crls);
|
||||
int OSSL_CMP_ITAV_get0_crls(const OSSL_CMP_ITAV *it, STACK_OF(X509_CRL) **out);
|
||||
OSSL_CMP_ITAV
|
||||
*OSSL_CMP_ITAV_new0_certReqTemplate(OSSL_CRMF_CERTTEMPLATE *certTemplate,
|
||||
OSSL_CMP_ATAVS *keySpec);
|
||||
int OSSL_CMP_ITAV_get1_certReqTemplate(const OSSL_CMP_ITAV *itav,
|
||||
OSSL_CRMF_CERTTEMPLATE **certTemplate,
|
||||
OSSL_CMP_ATAVS **keySpec);
|
||||
|
||||
OSSL_CMP_ATAV *OSSL_CMP_ATAV_create(ASN1_OBJECT *type, ASN1_TYPE *value);
|
||||
void OSSL_CMP_ATAV_set0(OSSL_CMP_ATAV *itav, ASN1_OBJECT *type,
|
||||
ASN1_TYPE *value);
|
||||
ASN1_OBJECT *OSSL_CMP_ATAV_get0_type(const OSSL_CMP_ATAV *itav);
|
||||
ASN1_TYPE *OSSL_CMP_ATAV_get0_value(const OSSL_CMP_ATAV *itav);
|
||||
OSSL_CMP_ATAV *OSSL_CMP_ATAV_new_algId(const X509_ALGOR *alg);
|
||||
X509_ALGOR *OSSL_CMP_ATAV_get0_algId(const OSSL_CMP_ATAV *atav);
|
||||
OSSL_CMP_ATAV *OSSL_CMP_ATAV_new_rsaKeyLen(int len);
|
||||
int OSSL_CMP_ATAV_get_rsaKeyLen(const OSSL_CMP_ATAV *atav);
|
||||
int OSSL_CMP_ATAV_push1(OSSL_CMP_ATAVS **sk_p, const OSSL_CMP_ATAV *atav);
|
||||
|
||||
void OSSL_CMP_MSG_free(OSSL_CMP_MSG *msg);
|
||||
|
||||
/* from cmp_ctx.c */
|
||||
OSSL_CMP_CTX *OSSL_CMP_CTX_new(OSSL_LIB_CTX *libctx, const char *propq);
|
||||
void OSSL_CMP_CTX_free(OSSL_CMP_CTX *ctx);
|
||||
int OSSL_CMP_CTX_reinit(OSSL_CMP_CTX *ctx);
|
||||
OSSL_LIB_CTX *OSSL_CMP_CTX_get0_libctx(const OSSL_CMP_CTX *ctx);
|
||||
const char *OSSL_CMP_CTX_get0_propq(const OSSL_CMP_CTX *ctx);
|
||||
/* CMP general options: */
|
||||
# define OSSL_CMP_OPT_LOG_VERBOSITY 0
|
||||
#define OSSL_CMP_OPT_LOG_VERBOSITY 0
|
||||
/* CMP transfer options: */
|
||||
# define OSSL_CMP_OPT_KEEP_ALIVE 10
|
||||
# define OSSL_CMP_OPT_MSG_TIMEOUT 11
|
||||
# define OSSL_CMP_OPT_TOTAL_TIMEOUT 12
|
||||
#define OSSL_CMP_OPT_KEEP_ALIVE 10
|
||||
#define OSSL_CMP_OPT_MSG_TIMEOUT 11
|
||||
#define OSSL_CMP_OPT_TOTAL_TIMEOUT 12
|
||||
#define OSSL_CMP_OPT_USE_TLS 13
|
||||
/* CMP request options: */
|
||||
# define OSSL_CMP_OPT_VALIDITY_DAYS 20
|
||||
# define OSSL_CMP_OPT_SUBJECTALTNAME_NODEFAULT 21
|
||||
# define OSSL_CMP_OPT_SUBJECTALTNAME_CRITICAL 22
|
||||
# define OSSL_CMP_OPT_POLICIES_CRITICAL 23
|
||||
# define OSSL_CMP_OPT_POPO_METHOD 24
|
||||
# define OSSL_CMP_OPT_IMPLICIT_CONFIRM 25
|
||||
# define OSSL_CMP_OPT_DISABLE_CONFIRM 26
|
||||
# define OSSL_CMP_OPT_REVOCATION_REASON 27
|
||||
#define OSSL_CMP_OPT_VALIDITY_DAYS 20
|
||||
#define OSSL_CMP_OPT_SUBJECTALTNAME_NODEFAULT 21
|
||||
#define OSSL_CMP_OPT_SUBJECTALTNAME_CRITICAL 22
|
||||
#define OSSL_CMP_OPT_POLICIES_CRITICAL 23
|
||||
#define OSSL_CMP_OPT_POPO_METHOD 24
|
||||
#define OSSL_CMP_OPT_IMPLICIT_CONFIRM 25
|
||||
#define OSSL_CMP_OPT_DISABLE_CONFIRM 26
|
||||
#define OSSL_CMP_OPT_REVOCATION_REASON 27
|
||||
/* CMP protection options: */
|
||||
# define OSSL_CMP_OPT_UNPROTECTED_SEND 30
|
||||
# define OSSL_CMP_OPT_UNPROTECTED_ERRORS 31
|
||||
# define OSSL_CMP_OPT_OWF_ALGNID 32
|
||||
# define OSSL_CMP_OPT_MAC_ALGNID 33
|
||||
# define OSSL_CMP_OPT_DIGEST_ALGNID 34
|
||||
# define OSSL_CMP_OPT_IGNORE_KEYUSAGE 35
|
||||
# define OSSL_CMP_OPT_PERMIT_TA_IN_EXTRACERTS_FOR_IR 36
|
||||
#define OSSL_CMP_OPT_UNPROTECTED_SEND 30
|
||||
#define OSSL_CMP_OPT_UNPROTECTED_ERRORS 31
|
||||
#define OSSL_CMP_OPT_OWF_ALGNID 32
|
||||
#define OSSL_CMP_OPT_MAC_ALGNID 33
|
||||
#define OSSL_CMP_OPT_DIGEST_ALGNID 34
|
||||
#define OSSL_CMP_OPT_IGNORE_KEYUSAGE 35
|
||||
#define OSSL_CMP_OPT_PERMIT_TA_IN_EXTRACERTS_FOR_IR 36
|
||||
#define OSSL_CMP_OPT_NO_CACHE_EXTRACERTS 37
|
||||
int OSSL_CMP_CTX_set_option(OSSL_CMP_CTX *ctx, int opt, int val);
|
||||
int OSSL_CMP_CTX_get_option(const OSSL_CMP_CTX *ctx, int opt);
|
||||
/* CMP-specific callback for logging and outputting the error queue: */
|
||||
int OSSL_CMP_CTX_set_log_cb(OSSL_CMP_CTX *ctx, OSSL_CMP_log_cb_t cb);
|
||||
# define OSSL_CMP_CTX_set_log_verbosity(ctx, level) \
|
||||
#define OSSL_CMP_CTX_set_log_verbosity(ctx, level) \
|
||||
OSSL_CMP_CTX_set_option(ctx, OSSL_CMP_OPT_LOG_VERBOSITY, level)
|
||||
void OSSL_CMP_CTX_print_errors(const OSSL_CMP_CTX *ctx);
|
||||
/* message transfer: */
|
||||
@@ -417,11 +532,13 @@ int OSSL_CMP_CTX_set1_server(OSSL_CMP_CTX *ctx, const char *address);
|
||||
int OSSL_CMP_CTX_set_serverPort(OSSL_CMP_CTX *ctx, int port);
|
||||
int OSSL_CMP_CTX_set1_proxy(OSSL_CMP_CTX *ctx, const char *name);
|
||||
int OSSL_CMP_CTX_set1_no_proxy(OSSL_CMP_CTX *ctx, const char *names);
|
||||
#ifndef OPENSSL_NO_HTTP
|
||||
int OSSL_CMP_CTX_set_http_cb(OSSL_CMP_CTX *ctx, OSSL_HTTP_bio_cb_t cb);
|
||||
int OSSL_CMP_CTX_set_http_cb_arg(OSSL_CMP_CTX *ctx, void *arg);
|
||||
void *OSSL_CMP_CTX_get_http_cb_arg(const OSSL_CMP_CTX *ctx);
|
||||
typedef OSSL_CMP_MSG *(*OSSL_CMP_transfer_cb_t) (OSSL_CMP_CTX *ctx,
|
||||
const OSSL_CMP_MSG *req);
|
||||
#endif
|
||||
typedef OSSL_CMP_MSG *(*OSSL_CMP_transfer_cb_t)(OSSL_CMP_CTX *ctx,
|
||||
const OSSL_CMP_MSG *req);
|
||||
int OSSL_CMP_CTX_set_transfer_cb(OSSL_CMP_CTX *ctx, OSSL_CMP_transfer_cb_t cb);
|
||||
int OSSL_CMP_CTX_set_transfer_cb_arg(OSSL_CMP_CTX *ctx, void *arg);
|
||||
void *OSSL_CMP_CTX_get_transfer_cb_arg(const OSSL_CMP_CTX *ctx);
|
||||
@@ -429,30 +546,36 @@ void *OSSL_CMP_CTX_get_transfer_cb_arg(const OSSL_CMP_CTX *ctx);
|
||||
int OSSL_CMP_CTX_set1_srvCert(OSSL_CMP_CTX *ctx, X509 *cert);
|
||||
int OSSL_CMP_CTX_set1_expected_sender(OSSL_CMP_CTX *ctx, const X509_NAME *name);
|
||||
int OSSL_CMP_CTX_set0_trustedStore(OSSL_CMP_CTX *ctx, X509_STORE *store);
|
||||
#define OSSL_CMP_CTX_set0_trusted OSSL_CMP_CTX_set0_trustedStore
|
||||
X509_STORE *OSSL_CMP_CTX_get0_trustedStore(const OSSL_CMP_CTX *ctx);
|
||||
#define OSSL_CMP_CTX_get0_trusted OSSL_CMP_CTX_get0_trustedStore
|
||||
int OSSL_CMP_CTX_set1_untrusted(OSSL_CMP_CTX *ctx, STACK_OF(X509) *certs);
|
||||
STACK_OF(X509) *OSSL_CMP_CTX_get0_untrusted(const OSSL_CMP_CTX *ctx);
|
||||
/* client authentication: */
|
||||
int OSSL_CMP_CTX_set1_cert(OSSL_CMP_CTX *ctx, X509 *cert);
|
||||
int OSSL_CMP_CTX_build_cert_chain(OSSL_CMP_CTX *ctx, X509_STORE *own_trusted,
|
||||
STACK_OF(X509) *candidates);
|
||||
STACK_OF(X509) *candidates);
|
||||
int OSSL_CMP_CTX_set1_pkey(OSSL_CMP_CTX *ctx, EVP_PKEY *pkey);
|
||||
int OSSL_CMP_CTX_set1_referenceValue(OSSL_CMP_CTX *ctx,
|
||||
const unsigned char *ref, int len);
|
||||
int OSSL_CMP_CTX_set1_secretValue(OSSL_CMP_CTX *ctx, const unsigned char *sec,
|
||||
const int len);
|
||||
const unsigned char *ref, int len);
|
||||
int OSSL_CMP_CTX_set1_secretValue(OSSL_CMP_CTX *ctx,
|
||||
const unsigned char *sec, int len);
|
||||
/* CMP message header and extra certificates: */
|
||||
int OSSL_CMP_CTX_set1_recipient(OSSL_CMP_CTX *ctx, const X509_NAME *name);
|
||||
int OSSL_CMP_CTX_push0_geninfo_ITAV(OSSL_CMP_CTX *ctx, OSSL_CMP_ITAV *itav);
|
||||
int OSSL_CMP_CTX_reset_geninfo_ITAVs(OSSL_CMP_CTX *ctx);
|
||||
STACK_OF(OSSL_CMP_ITAV)
|
||||
*OSSL_CMP_CTX_get0_geninfo_ITAVs(const OSSL_CMP_CTX *ctx);
|
||||
int OSSL_CMP_CTX_set1_extraCertsOut(OSSL_CMP_CTX *ctx,
|
||||
STACK_OF(X509) *extraCertsOut);
|
||||
STACK_OF(X509) *extraCertsOut);
|
||||
/* certificate template: */
|
||||
int OSSL_CMP_CTX_set0_newPkey(OSSL_CMP_CTX *ctx, int priv, EVP_PKEY *pkey);
|
||||
EVP_PKEY *OSSL_CMP_CTX_get0_newPkey(const OSSL_CMP_CTX *ctx, int priv);
|
||||
int OSSL_CMP_CTX_set1_issuer(OSSL_CMP_CTX *ctx, const X509_NAME *name);
|
||||
int OSSL_CMP_CTX_set1_serialNumber(OSSL_CMP_CTX *ctx, const ASN1_INTEGER *sn);
|
||||
int OSSL_CMP_CTX_set1_subjectName(OSSL_CMP_CTX *ctx, const X509_NAME *name);
|
||||
int OSSL_CMP_CTX_push1_subjectAltName(OSSL_CMP_CTX *ctx,
|
||||
const GENERAL_NAME *name);
|
||||
const GENERAL_NAME *name);
|
||||
int OSSL_CMP_CTX_set0_reqExtensions(OSSL_CMP_CTX *ctx, X509_EXTENSIONS *exts);
|
||||
int OSSL_CMP_CTX_reqExtensions_have_SAN(OSSL_CMP_CTX *ctx);
|
||||
int OSSL_CMP_CTX_push0_policy(OSSL_CMP_CTX *ctx, POLICYINFO *pinfo);
|
||||
@@ -461,10 +584,10 @@ int OSSL_CMP_CTX_set1_p10CSR(OSSL_CMP_CTX *ctx, const X509_REQ *csr);
|
||||
/* misc body contents: */
|
||||
int OSSL_CMP_CTX_push0_genm_ITAV(OSSL_CMP_CTX *ctx, OSSL_CMP_ITAV *itav);
|
||||
/* certificate confirmation: */
|
||||
typedef int (*OSSL_CMP_certConf_cb_t) (OSSL_CMP_CTX *ctx, X509 *cert,
|
||||
int fail_info, const char **txt);
|
||||
typedef int (*OSSL_CMP_certConf_cb_t)(OSSL_CMP_CTX *ctx, X509 *cert,
|
||||
int fail_info, const char **txt);
|
||||
int OSSL_CMP_certConf_cb(OSSL_CMP_CTX *ctx, X509 *cert, int fail_info,
|
||||
const char **text);
|
||||
const char **text);
|
||||
int OSSL_CMP_CTX_set_certConf_cb(OSSL_CMP_CTX *ctx, OSSL_CMP_certConf_cb_t cb);
|
||||
int OSSL_CMP_CTX_set_certConf_cb_arg(OSSL_CMP_CTX *ctx, void *arg);
|
||||
void *OSSL_CMP_CTX_get_certConf_cb_arg(const OSSL_CMP_CTX *ctx);
|
||||
@@ -472,36 +595,40 @@ void *OSSL_CMP_CTX_get_certConf_cb_arg(const OSSL_CMP_CTX *ctx);
|
||||
int OSSL_CMP_CTX_get_status(const OSSL_CMP_CTX *ctx);
|
||||
OSSL_CMP_PKIFREETEXT *OSSL_CMP_CTX_get0_statusString(const OSSL_CMP_CTX *ctx);
|
||||
int OSSL_CMP_CTX_get_failInfoCode(const OSSL_CMP_CTX *ctx);
|
||||
# define OSSL_CMP_PKISI_BUFLEN 1024
|
||||
#define OSSL_CMP_PKISI_BUFLEN 1024
|
||||
X509 *OSSL_CMP_CTX_get0_validatedSrvCert(const OSSL_CMP_CTX *ctx);
|
||||
X509 *OSSL_CMP_CTX_get0_newCert(const OSSL_CMP_CTX *ctx);
|
||||
STACK_OF(X509) *OSSL_CMP_CTX_get1_newChain(const OSSL_CMP_CTX *ctx);
|
||||
STACK_OF(X509) *OSSL_CMP_CTX_get1_caPubs(const OSSL_CMP_CTX *ctx);
|
||||
STACK_OF(X509) *OSSL_CMP_CTX_get1_extraCertsIn(const OSSL_CMP_CTX *ctx);
|
||||
int OSSL_CMP_CTX_set1_transactionID(OSSL_CMP_CTX *ctx,
|
||||
const ASN1_OCTET_STRING *id);
|
||||
const ASN1_OCTET_STRING *id);
|
||||
int OSSL_CMP_CTX_set1_senderNonce(OSSL_CMP_CTX *ctx,
|
||||
const ASN1_OCTET_STRING *nonce);
|
||||
const ASN1_OCTET_STRING *nonce);
|
||||
|
||||
/* from cmp_status.c */
|
||||
char *OSSL_CMP_CTX_snprint_PKIStatus(const OSSL_CMP_CTX *ctx, char *buf,
|
||||
size_t bufsize);
|
||||
size_t bufsize);
|
||||
char *OSSL_CMP_snprint_PKIStatusInfo(const OSSL_CMP_PKISI *statusInfo,
|
||||
char *buf, size_t bufsize);
|
||||
char *buf, size_t bufsize);
|
||||
OSSL_CMP_PKISI *
|
||||
OSSL_CMP_STATUSINFO_new(int status, int fail_info, const char *text);
|
||||
|
||||
/* from cmp_hdr.c */
|
||||
ASN1_OCTET_STRING *OSSL_CMP_HDR_get0_transactionID(const
|
||||
OSSL_CMP_PKIHEADER *hdr);
|
||||
ASN1_OCTET_STRING *OSSL_CMP_HDR_get0_transactionID(const OSSL_CMP_PKIHEADER *hdr);
|
||||
ASN1_OCTET_STRING *OSSL_CMP_HDR_get0_recipNonce(const OSSL_CMP_PKIHEADER *hdr);
|
||||
STACK_OF(OSSL_CMP_ITAV)
|
||||
*OSSL_CMP_HDR_get0_geninfo_ITAVs(const OSSL_CMP_PKIHEADER *hdr);
|
||||
|
||||
/* from cmp_msg.c */
|
||||
OSSL_CMP_PKIHEADER *OSSL_CMP_MSG_get0_header(const OSSL_CMP_MSG *msg);
|
||||
int OSSL_CMP_MSG_get_bodytype(const OSSL_CMP_MSG *msg);
|
||||
X509_PUBKEY *OSSL_CMP_MSG_get0_certreq_publickey(const OSSL_CMP_MSG *msg);
|
||||
int OSSL_CMP_MSG_update_transactionID(OSSL_CMP_CTX *ctx, OSSL_CMP_MSG *msg);
|
||||
int OSSL_CMP_MSG_update_recipNonce(OSSL_CMP_CTX *ctx, OSSL_CMP_MSG *msg);
|
||||
OSSL_CRMF_MSG *OSSL_CMP_CTX_setup_CRM(OSSL_CMP_CTX *ctx, int for_KUR, int rid);
|
||||
OSSL_CMP_MSG *OSSL_CMP_MSG_read(const char *file, OSSL_LIB_CTX *libctx,
|
||||
const char *propq);
|
||||
const char *propq);
|
||||
int OSSL_CMP_MSG_write(const char *file, const OSSL_CMP_MSG *msg);
|
||||
OSSL_CMP_MSG *d2i_OSSL_CMP_MSG_bio(BIO *bio, OSSL_CMP_MSG **msg);
|
||||
int i2d_OSSL_CMP_MSG_bio(BIO *bio, const OSSL_CMP_MSG *msg);
|
||||
@@ -509,84 +636,107 @@ int i2d_OSSL_CMP_MSG_bio(BIO *bio, const OSSL_CMP_MSG *msg);
|
||||
/* from cmp_vfy.c */
|
||||
int OSSL_CMP_validate_msg(OSSL_CMP_CTX *ctx, const OSSL_CMP_MSG *msg);
|
||||
int OSSL_CMP_validate_cert_path(const OSSL_CMP_CTX *ctx,
|
||||
X509_STORE *trusted_store, X509 *cert);
|
||||
X509_STORE *trusted_store, X509 *cert);
|
||||
|
||||
/* from cmp_http.c */
|
||||
#ifndef OPENSSL_NO_HTTP
|
||||
OSSL_CMP_MSG *OSSL_CMP_MSG_http_perform(OSSL_CMP_CTX *ctx,
|
||||
const OSSL_CMP_MSG *req);
|
||||
const OSSL_CMP_MSG *req);
|
||||
#endif
|
||||
|
||||
/* from cmp_server.c */
|
||||
typedef struct ossl_cmp_srv_ctx_st OSSL_CMP_SRV_CTX;
|
||||
OSSL_CMP_MSG *OSSL_CMP_SRV_process_request(OSSL_CMP_SRV_CTX *srv_ctx,
|
||||
const OSSL_CMP_MSG *req);
|
||||
OSSL_CMP_MSG * OSSL_CMP_CTX_server_perform(OSSL_CMP_CTX *client_ctx,
|
||||
const OSSL_CMP_MSG *req);
|
||||
const OSSL_CMP_MSG *req);
|
||||
OSSL_CMP_MSG *OSSL_CMP_CTX_server_perform(OSSL_CMP_CTX *client_ctx,
|
||||
const OSSL_CMP_MSG *req);
|
||||
OSSL_CMP_SRV_CTX *OSSL_CMP_SRV_CTX_new(OSSL_LIB_CTX *libctx, const char *propq);
|
||||
void OSSL_CMP_SRV_CTX_free(OSSL_CMP_SRV_CTX *srv_ctx);
|
||||
typedef OSSL_CMP_PKISI *(*OSSL_CMP_SRV_cert_request_cb_t)
|
||||
(OSSL_CMP_SRV_CTX *srv_ctx, const OSSL_CMP_MSG *req, int certReqId,
|
||||
const OSSL_CRMF_MSG *crm, const X509_REQ *p10cr,
|
||||
X509 **certOut, STACK_OF(X509) **chainOut, STACK_OF(X509) **caPubs);
|
||||
typedef OSSL_CMP_PKISI *(*OSSL_CMP_SRV_cert_request_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
||||
const OSSL_CMP_MSG *req, int certReqId,
|
||||
const OSSL_CRMF_MSG *crm, const X509_REQ *p10,
|
||||
X509 **certOut, STACK_OF(X509) **chainOut, STACK_OF(X509) **caPubs);
|
||||
typedef OSSL_CMP_PKISI *(*OSSL_CMP_SRV_rr_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
||||
const OSSL_CMP_MSG *req,
|
||||
const X509_NAME *issuer,
|
||||
const ASN1_INTEGER *serial);
|
||||
const OSSL_CMP_MSG *req,
|
||||
const X509_NAME *issuer,
|
||||
const ASN1_INTEGER *serial);
|
||||
typedef int (*OSSL_CMP_SRV_genm_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
||||
const OSSL_CMP_MSG *req,
|
||||
const STACK_OF(OSSL_CMP_ITAV) *in,
|
||||
STACK_OF(OSSL_CMP_ITAV) **out);
|
||||
const OSSL_CMP_MSG *req,
|
||||
const STACK_OF(OSSL_CMP_ITAV) *in,
|
||||
STACK_OF(OSSL_CMP_ITAV) **out);
|
||||
typedef void (*OSSL_CMP_SRV_error_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
||||
const OSSL_CMP_MSG *req,
|
||||
const OSSL_CMP_PKISI *statusInfo,
|
||||
const ASN1_INTEGER *errorCode,
|
||||
const OSSL_CMP_PKIFREETEXT *errDetails);
|
||||
const OSSL_CMP_MSG *req,
|
||||
const OSSL_CMP_PKISI *statusInfo,
|
||||
const ASN1_INTEGER *errorCode,
|
||||
const OSSL_CMP_PKIFREETEXT *errDetails);
|
||||
typedef int (*OSSL_CMP_SRV_certConf_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
||||
const OSSL_CMP_MSG *req,
|
||||
int certReqId,
|
||||
const ASN1_OCTET_STRING *certHash,
|
||||
const OSSL_CMP_PKISI *si);
|
||||
const OSSL_CMP_MSG *req,
|
||||
int certReqId,
|
||||
const ASN1_OCTET_STRING *certHash,
|
||||
const OSSL_CMP_PKISI *si);
|
||||
typedef int (*OSSL_CMP_SRV_pollReq_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
||||
const OSSL_CMP_MSG *req, int certReqId,
|
||||
OSSL_CMP_MSG **certReq,
|
||||
int64_t *check_after);
|
||||
const OSSL_CMP_MSG *req, int certReqId,
|
||||
OSSL_CMP_MSG **certReq,
|
||||
int64_t *check_after);
|
||||
int OSSL_CMP_SRV_CTX_init(OSSL_CMP_SRV_CTX *srv_ctx, void *custom_ctx,
|
||||
OSSL_CMP_SRV_cert_request_cb_t process_cert_request,
|
||||
OSSL_CMP_SRV_rr_cb_t process_rr,
|
||||
OSSL_CMP_SRV_genm_cb_t process_genm,
|
||||
OSSL_CMP_SRV_error_cb_t process_error,
|
||||
OSSL_CMP_SRV_certConf_cb_t process_certConf,
|
||||
OSSL_CMP_SRV_pollReq_cb_t process_pollReq);
|
||||
OSSL_CMP_SRV_cert_request_cb_t process_cert_request,
|
||||
OSSL_CMP_SRV_rr_cb_t process_rr,
|
||||
OSSL_CMP_SRV_genm_cb_t process_genm,
|
||||
OSSL_CMP_SRV_error_cb_t process_error,
|
||||
OSSL_CMP_SRV_certConf_cb_t process_certConf,
|
||||
OSSL_CMP_SRV_pollReq_cb_t process_pollReq);
|
||||
typedef int (*OSSL_CMP_SRV_delayed_delivery_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
||||
const OSSL_CMP_MSG *req);
|
||||
typedef int (*OSSL_CMP_SRV_clean_transaction_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
||||
const ASN1_OCTET_STRING *id);
|
||||
int OSSL_CMP_SRV_CTX_init_trans(OSSL_CMP_SRV_CTX *srv_ctx,
|
||||
OSSL_CMP_SRV_delayed_delivery_cb_t delay,
|
||||
OSSL_CMP_SRV_clean_transaction_cb_t clean);
|
||||
OSSL_CMP_CTX *OSSL_CMP_SRV_CTX_get0_cmp_ctx(const OSSL_CMP_SRV_CTX *srv_ctx);
|
||||
void *OSSL_CMP_SRV_CTX_get0_custom_ctx(const OSSL_CMP_SRV_CTX *srv_ctx);
|
||||
int OSSL_CMP_SRV_CTX_set_send_unprotected_errors(OSSL_CMP_SRV_CTX *srv_ctx,
|
||||
int val);
|
||||
int val);
|
||||
int OSSL_CMP_SRV_CTX_set_accept_unprotected(OSSL_CMP_SRV_CTX *srv_ctx, int val);
|
||||
int OSSL_CMP_SRV_CTX_set_accept_raverified(OSSL_CMP_SRV_CTX *srv_ctx, int val);
|
||||
int OSSL_CMP_SRV_CTX_set_grant_implicit_confirm(OSSL_CMP_SRV_CTX *srv_ctx,
|
||||
int val);
|
||||
int val);
|
||||
|
||||
/* from cmp_client.c */
|
||||
X509 *OSSL_CMP_exec_certreq(OSSL_CMP_CTX *ctx, int req_type,
|
||||
const OSSL_CRMF_MSG *crm);
|
||||
# define OSSL_CMP_IR 0
|
||||
# define OSSL_CMP_CR 2
|
||||
# define OSSL_CMP_P10CR 4
|
||||
# define OSSL_CMP_KUR 7
|
||||
# define OSSL_CMP_exec_IR_ses(ctx) \
|
||||
const OSSL_CRMF_MSG *crm);
|
||||
#define OSSL_CMP_IR 0
|
||||
#define OSSL_CMP_CR 2
|
||||
#define OSSL_CMP_P10CR 4
|
||||
#define OSSL_CMP_KUR 7
|
||||
#define OSSL_CMP_GENM 21
|
||||
#define OSSL_CMP_ERROR 23
|
||||
#define OSSL_CMP_exec_IR_ses(ctx) \
|
||||
OSSL_CMP_exec_certreq(ctx, OSSL_CMP_IR, NULL)
|
||||
# define OSSL_CMP_exec_CR_ses(ctx) \
|
||||
#define OSSL_CMP_exec_CR_ses(ctx) \
|
||||
OSSL_CMP_exec_certreq(ctx, OSSL_CMP_CR, NULL)
|
||||
# define OSSL_CMP_exec_P10CR_ses(ctx) \
|
||||
#define OSSL_CMP_exec_P10CR_ses(ctx) \
|
||||
OSSL_CMP_exec_certreq(ctx, OSSL_CMP_P10CR, NULL)
|
||||
# define OSSL_CMP_exec_KUR_ses(ctx) \
|
||||
#define OSSL_CMP_exec_KUR_ses(ctx) \
|
||||
OSSL_CMP_exec_certreq(ctx, OSSL_CMP_KUR, NULL)
|
||||
int OSSL_CMP_try_certreq(OSSL_CMP_CTX *ctx, int req_type,
|
||||
const OSSL_CRMF_MSG *crm, int *checkAfter);
|
||||
const OSSL_CRMF_MSG *crm, int *checkAfter);
|
||||
int OSSL_CMP_exec_RR_ses(OSSL_CMP_CTX *ctx);
|
||||
STACK_OF(OSSL_CMP_ITAV) *OSSL_CMP_exec_GENM_ses(OSSL_CMP_CTX *ctx);
|
||||
|
||||
# ifdef __cplusplus
|
||||
/* from cmp_genm.c */
|
||||
int OSSL_CMP_get1_caCerts(OSSL_CMP_CTX *ctx, STACK_OF(X509) **out);
|
||||
int OSSL_CMP_get1_rootCaKeyUpdate(OSSL_CMP_CTX *ctx,
|
||||
const X509 *oldWithOld, X509 **newWithNew,
|
||||
X509 **newWithOld, X509 **oldWithNew);
|
||||
int OSSL_CMP_get1_crlUpdate(OSSL_CMP_CTX *ctx, const X509 *crlcert,
|
||||
const X509_CRL *last_crl,
|
||||
X509_CRL **crl);
|
||||
int OSSL_CMP_get1_certReqTemplate(OSSL_CMP_CTX *ctx,
|
||||
OSSL_CRMF_CERTTEMPLATE **certTemplate,
|
||||
OSSL_CMP_ATAVS **keySpec);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
# endif /* !defined(OPENSSL_NO_CMP) */
|
||||
#endif
|
||||
#endif /* !defined(OPENSSL_NO_CMP) */
|
||||
#endif /* !defined(OPENSSL_CMP_H) */
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* Copyright 2007-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright Nokia 2007-2019
|
||||
* Copyright Siemens AG 2015-2019
|
||||
*
|
||||
* 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
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#ifndef OPENSSL_CMP_UTIL_H
|
||||
#define OPENSSL_CMP_UTIL_H
|
||||
#pragma once
|
||||
|
||||
#include <openssl/opensslconf.h>
|
||||
#ifndef OPENSSL_NO_CMP
|
||||
|
||||
#include <openssl/macros.h>
|
||||
#include <openssl/trace.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int OSSL_CMP_log_open(void);
|
||||
void OSSL_CMP_log_close(void);
|
||||
#define OSSL_CMP_LOG_PREFIX "CMP "
|
||||
|
||||
/*
|
||||
* generalized logging/error callback mirroring the severity levels of syslog.h
|
||||
*/
|
||||
typedef int OSSL_CMP_severity;
|
||||
#define OSSL_CMP_LOG_EMERG 0
|
||||
#define OSSL_CMP_LOG_ALERT 1
|
||||
#define OSSL_CMP_LOG_CRIT 2
|
||||
#define OSSL_CMP_LOG_ERR 3
|
||||
#define OSSL_CMP_LOG_WARNING 4
|
||||
#define OSSL_CMP_LOG_NOTICE 5
|
||||
#define OSSL_CMP_LOG_INFO 6
|
||||
#define OSSL_CMP_LOG_DEBUG 7
|
||||
#define OSSL_CMP_LOG_TRACE 8
|
||||
#define OSSL_CMP_LOG_MAX OSSL_CMP_LOG_TRACE
|
||||
typedef int (*OSSL_CMP_log_cb_t)(const char *func, const char *file, int line,
|
||||
OSSL_CMP_severity level, const char *msg);
|
||||
|
||||
int OSSL_CMP_print_to_bio(BIO *bio, const char *component, const char *file,
|
||||
int line, OSSL_CMP_severity level, const char *msg);
|
||||
/* use of the logging callback for outputting error queue */
|
||||
void OSSL_CMP_print_errors_cb(OSSL_CMP_log_cb_t log_fn);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* !defined(OPENSSL_NO_CMP) */
|
||||
#endif /* !defined(OPENSSL_CMP_UTIL_H) */
|
||||
@@ -0,0 +1,132 @@
|
||||
/*
|
||||
* Generated by util/mkerr.pl DO NOT EDIT
|
||||
* Copyright 1995-2025 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* 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
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#ifndef OPENSSL_CMPERR_H
|
||||
#define OPENSSL_CMPERR_H
|
||||
#pragma once
|
||||
|
||||
#include <openssl/opensslconf.h>
|
||||
#include <openssl/symhacks.h>
|
||||
#include <openssl/cryptoerr_legacy.h>
|
||||
|
||||
#ifndef OPENSSL_NO_CMP
|
||||
|
||||
/*
|
||||
* CMP reason codes.
|
||||
*/
|
||||
#define CMP_R_ALGORITHM_NOT_SUPPORTED 139
|
||||
#define CMP_R_BAD_CHECKAFTER_IN_POLLREP 167
|
||||
#define CMP_R_BAD_REQUEST_ID 108
|
||||
#define CMP_R_CERTHASH_UNMATCHED 156
|
||||
#define CMP_R_CERTID_NOT_FOUND 109
|
||||
#define CMP_R_CERTIFICATE_NOT_ACCEPTED 169
|
||||
#define CMP_R_CERTIFICATE_NOT_FOUND 112
|
||||
#define CMP_R_CERTREQMSG_NOT_FOUND 157
|
||||
#define CMP_R_CERTRESPONSE_NOT_FOUND 113
|
||||
#define CMP_R_CERT_AND_KEY_DO_NOT_MATCH 114
|
||||
#define CMP_R_CHECKAFTER_OUT_OF_RANGE 181
|
||||
#define CMP_R_ENCOUNTERED_KEYUPDATEWARNING 176
|
||||
#define CMP_R_ENCOUNTERED_WAITING 162
|
||||
#define CMP_R_ERROR_CALCULATING_PROTECTION 115
|
||||
#define CMP_R_ERROR_CREATING_CERTCONF 116
|
||||
#define CMP_R_ERROR_CREATING_CERTREP 117
|
||||
#define CMP_R_ERROR_CREATING_CERTREQ 163
|
||||
#define CMP_R_ERROR_CREATING_ERROR 118
|
||||
#define CMP_R_ERROR_CREATING_GENM 119
|
||||
#define CMP_R_ERROR_CREATING_GENP 120
|
||||
#define CMP_R_ERROR_CREATING_PKICONF 122
|
||||
#define CMP_R_ERROR_CREATING_POLLREP 123
|
||||
#define CMP_R_ERROR_CREATING_POLLREQ 124
|
||||
#define CMP_R_ERROR_CREATING_RP 125
|
||||
#define CMP_R_ERROR_CREATING_RR 126
|
||||
#define CMP_R_ERROR_PARSING_PKISTATUS 107
|
||||
#define CMP_R_ERROR_PROCESSING_MESSAGE 158
|
||||
#define CMP_R_ERROR_PROTECTING_MESSAGE 127
|
||||
#define CMP_R_ERROR_SETTING_CERTHASH 128
|
||||
#define CMP_R_ERROR_UNEXPECTED_CERTCONF 160
|
||||
#define CMP_R_ERROR_VALIDATING_PROTECTION 140
|
||||
#define CMP_R_ERROR_VALIDATING_SIGNATURE 171
|
||||
#define CMP_R_EXPECTED_POLLREQ 104
|
||||
#define CMP_R_FAILED_BUILDING_OWN_CHAIN 164
|
||||
#define CMP_R_FAILED_EXTRACTING_CENTRAL_GEN_KEY 203
|
||||
#define CMP_R_FAILED_EXTRACTING_PUBKEY 141
|
||||
#define CMP_R_FAILURE_OBTAINING_RANDOM 110
|
||||
#define CMP_R_FAIL_INFO_OUT_OF_RANGE 129
|
||||
#define CMP_R_GENERATE_CERTREQTEMPLATE 197
|
||||
#define CMP_R_GENERATE_CRLSTATUS 198
|
||||
#define CMP_R_GETTING_GENP 192
|
||||
#define CMP_R_GET_ITAV 199
|
||||
#define CMP_R_INVALID_ARGS 100
|
||||
#define CMP_R_INVALID_GENP 193
|
||||
#define CMP_R_INVALID_KEYSPEC 202
|
||||
#define CMP_R_INVALID_OPTION 174
|
||||
#define CMP_R_INVALID_ROOTCAKEYUPDATE 195
|
||||
#define CMP_R_MISSING_CENTRAL_GEN_KEY 204
|
||||
#define CMP_R_MISSING_CERTID 165
|
||||
#define CMP_R_MISSING_KEY_INPUT_FOR_CREATING_PROTECTION 130
|
||||
#define CMP_R_MISSING_KEY_USAGE_DIGITALSIGNATURE 142
|
||||
#define CMP_R_MISSING_P10CSR 121
|
||||
#define CMP_R_MISSING_PBM_SECRET 166
|
||||
#define CMP_R_MISSING_PRIVATE_KEY 131
|
||||
#define CMP_R_MISSING_PRIVATE_KEY_FOR_POPO 190
|
||||
#define CMP_R_MISSING_PROTECTION 143
|
||||
#define CMP_R_MISSING_PUBLIC_KEY 183
|
||||
#define CMP_R_MISSING_REFERENCE_CERT 168
|
||||
#define CMP_R_MISSING_SECRET 178
|
||||
#define CMP_R_MISSING_SENDER_IDENTIFICATION 111
|
||||
#define CMP_R_MISSING_TRUST_ANCHOR 179
|
||||
#define CMP_R_MISSING_TRUST_STORE 144
|
||||
#define CMP_R_MULTIPLE_REQUESTS_NOT_SUPPORTED 161
|
||||
#define CMP_R_MULTIPLE_RESPONSES_NOT_SUPPORTED 170
|
||||
#define CMP_R_MULTIPLE_SAN_SOURCES 102
|
||||
#define CMP_R_NO_STDIO 194
|
||||
#define CMP_R_NO_SUITABLE_SENDER_CERT 145
|
||||
#define CMP_R_NULL_ARGUMENT 103
|
||||
#define CMP_R_PKIBODY_ERROR 146
|
||||
#define CMP_R_PKISTATUSINFO_NOT_FOUND 132
|
||||
#define CMP_R_POLLING_FAILED 172
|
||||
#define CMP_R_POTENTIALLY_INVALID_CERTIFICATE 147
|
||||
#define CMP_R_RECEIVED_ERROR 180
|
||||
#define CMP_R_RECIPNONCE_UNMATCHED 148
|
||||
#define CMP_R_REQUEST_NOT_ACCEPTED 149
|
||||
#define CMP_R_REQUEST_REJECTED_BY_SERVER 182
|
||||
#define CMP_R_SENDER_GENERALNAME_TYPE_NOT_SUPPORTED 150
|
||||
#define CMP_R_SRVCERT_DOES_NOT_VALIDATE_MSG 151
|
||||
#define CMP_R_TOTAL_TIMEOUT 184
|
||||
#define CMP_R_TRANSACTIONID_UNMATCHED 152
|
||||
#define CMP_R_TRANSFER_ERROR 159
|
||||
#define CMP_R_UNCLEAN_CTX 191
|
||||
#define CMP_R_UNEXPECTED_CENTRAL_GEN_KEY 205
|
||||
#define CMP_R_UNEXPECTED_CERTPROFILE 196
|
||||
#define CMP_R_UNEXPECTED_CRLSTATUSLIST 201
|
||||
#define CMP_R_UNEXPECTED_PKIBODY 133
|
||||
#define CMP_R_UNEXPECTED_PKISTATUS 185
|
||||
#define CMP_R_UNEXPECTED_POLLREQ 105
|
||||
#define CMP_R_UNEXPECTED_PVNO 153
|
||||
#define CMP_R_UNEXPECTED_SENDER 106
|
||||
#define CMP_R_UNKNOWN_ALGORITHM_ID 134
|
||||
#define CMP_R_UNKNOWN_CERT_TYPE 135
|
||||
#define CMP_R_UNKNOWN_CRL_ISSUER 200
|
||||
#define CMP_R_UNKNOWN_PKISTATUS 186
|
||||
#define CMP_R_UNSUPPORTED_ALGORITHM 136
|
||||
#define CMP_R_UNSUPPORTED_KEY_TYPE 137
|
||||
#define CMP_R_UNSUPPORTED_PKIBODY 101
|
||||
#define CMP_R_UNSUPPORTED_PROTECTION_ALG_DHBASEDMAC 154
|
||||
#define CMP_R_VALUE_TOO_LARGE 175
|
||||
#define CMP_R_VALUE_TOO_SMALL 177
|
||||
#define CMP_R_WRONG_ALGORITHM_OID 138
|
||||
#define CMP_R_WRONG_CERTID 189
|
||||
#define CMP_R_WRONG_CERTID_IN_RP 187
|
||||
#define CMP_R_WRONG_PBM_VALUE 155
|
||||
#define CMP_R_WRONG_RP_COMPONENT_COUNT 188
|
||||
#define CMP_R_WRONG_SERIAL_IN_RP 173
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@@ -1,27 +1,42 @@
|
||||
/*
|
||||
* Copyright 2008-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* WARNING: do not edit!
|
||||
* Generated by Makefile from include/openssl/cms.h.in
|
||||
*
|
||||
* Licensed under the OpenSSL license (the "License"). You may not use
|
||||
* Copyright 2008-2026 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* 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
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#ifndef HEADER_CMS_H
|
||||
# define HEADER_CMS_H
|
||||
/* clang-format off */
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
/* clang-format on */
|
||||
|
||||
# ifndef OPENSSL_NO_CMS
|
||||
# include <openssl/x509.h>
|
||||
# include <openssl/x509v3.h>
|
||||
# include <openssl/cmserr.h>
|
||||
# ifdef __cplusplus
|
||||
#ifndef OPENSSL_CMS_H
|
||||
#define OPENSSL_CMS_H
|
||||
#pragma once
|
||||
|
||||
#include <openssl/macros.h>
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#define HEADER_CMS_H
|
||||
#endif
|
||||
|
||||
#include <openssl/opensslconf.h>
|
||||
|
||||
#ifndef OPENSSL_NO_CMS
|
||||
#include <openssl/x509.h>
|
||||
#include <openssl/x509v3.h>
|
||||
#include <openssl/cmserr.h>
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
#endif
|
||||
|
||||
typedef struct CMS_EnvelopedData_st CMS_EnvelopedData;
|
||||
typedef struct CMS_ContentInfo_st CMS_ContentInfo;
|
||||
typedef struct CMS_SignerInfo_st CMS_SignerInfo;
|
||||
typedef struct CMS_SignedData_st CMS_SignedData;
|
||||
typedef struct CMS_CertificateChoices CMS_CertificateChoices;
|
||||
typedef struct CMS_RevocationInfoChoice_st CMS_RevocationInfoChoice;
|
||||
typedef struct CMS_RecipientInfo_st CMS_RecipientInfo;
|
||||
@@ -30,62 +45,177 @@ typedef struct CMS_Receipt_st CMS_Receipt;
|
||||
typedef struct CMS_RecipientEncryptedKey_st CMS_RecipientEncryptedKey;
|
||||
typedef struct CMS_OtherKeyAttribute_st CMS_OtherKeyAttribute;
|
||||
|
||||
DEFINE_STACK_OF(CMS_SignerInfo)
|
||||
DEFINE_STACK_OF(CMS_RecipientEncryptedKey)
|
||||
DEFINE_STACK_OF(CMS_RecipientInfo)
|
||||
DEFINE_STACK_OF(CMS_RevocationInfoChoice)
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(CMS_SignerInfo, CMS_SignerInfo, CMS_SignerInfo)
|
||||
#define sk_CMS_SignerInfo_num(sk) OPENSSL_sk_num(ossl_check_const_CMS_SignerInfo_sk_type(sk))
|
||||
#define sk_CMS_SignerInfo_value(sk, idx) ((CMS_SignerInfo *)OPENSSL_sk_value(ossl_check_const_CMS_SignerInfo_sk_type(sk), (idx)))
|
||||
#define sk_CMS_SignerInfo_new(cmp) ((STACK_OF(CMS_SignerInfo) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new(ossl_check_CMS_SignerInfo_compfunc_type(cmp)), sk_CMS_SignerInfo_cmpfunc_thunk))
|
||||
#define sk_CMS_SignerInfo_new_null() ((STACK_OF(CMS_SignerInfo) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_CMS_SignerInfo_freefunc_thunk))
|
||||
#define sk_CMS_SignerInfo_new_reserve(cmp, n) ((STACK_OF(CMS_SignerInfo) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new_reserve(ossl_check_CMS_SignerInfo_compfunc_type(cmp), (n)), sk_CMS_SignerInfo_cmpfunc_thunk))
|
||||
#define sk_CMS_SignerInfo_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_CMS_SignerInfo_sk_type(sk), (n))
|
||||
#define sk_CMS_SignerInfo_free(sk) OPENSSL_sk_free(ossl_check_CMS_SignerInfo_sk_type(sk))
|
||||
#define sk_CMS_SignerInfo_zero(sk) OPENSSL_sk_zero(ossl_check_CMS_SignerInfo_sk_type(sk))
|
||||
#define sk_CMS_SignerInfo_delete(sk, i) ((CMS_SignerInfo *)OPENSSL_sk_delete(ossl_check_CMS_SignerInfo_sk_type(sk), (i)))
|
||||
#define sk_CMS_SignerInfo_delete_ptr(sk, ptr) ((CMS_SignerInfo *)OPENSSL_sk_delete_ptr(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr)))
|
||||
#define sk_CMS_SignerInfo_push(sk, ptr) OPENSSL_sk_push(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr))
|
||||
#define sk_CMS_SignerInfo_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr))
|
||||
#define sk_CMS_SignerInfo_pop(sk) ((CMS_SignerInfo *)OPENSSL_sk_pop(ossl_check_CMS_SignerInfo_sk_type(sk)))
|
||||
#define sk_CMS_SignerInfo_shift(sk) ((CMS_SignerInfo *)OPENSSL_sk_shift(ossl_check_CMS_SignerInfo_sk_type(sk)))
|
||||
#define sk_CMS_SignerInfo_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_freefunc_type(freefunc))
|
||||
#define sk_CMS_SignerInfo_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr), (idx))
|
||||
#define sk_CMS_SignerInfo_set(sk, idx, ptr) ((CMS_SignerInfo *)OPENSSL_sk_set(ossl_check_CMS_SignerInfo_sk_type(sk), (idx), ossl_check_CMS_SignerInfo_type(ptr)))
|
||||
#define sk_CMS_SignerInfo_find(sk, ptr) OPENSSL_sk_find(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr))
|
||||
#define sk_CMS_SignerInfo_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr))
|
||||
#define sk_CMS_SignerInfo_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr), pnum)
|
||||
#define sk_CMS_SignerInfo_sort(sk) OPENSSL_sk_sort(ossl_check_CMS_SignerInfo_sk_type(sk))
|
||||
#define sk_CMS_SignerInfo_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_CMS_SignerInfo_sk_type(sk))
|
||||
#define sk_CMS_SignerInfo_dup(sk) ((STACK_OF(CMS_SignerInfo) *)OPENSSL_sk_dup(ossl_check_const_CMS_SignerInfo_sk_type(sk)))
|
||||
#define sk_CMS_SignerInfo_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CMS_SignerInfo) *)OPENSSL_sk_deep_copy(ossl_check_const_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_copyfunc_type(copyfunc), ossl_check_CMS_SignerInfo_freefunc_type(freefunc)))
|
||||
#define sk_CMS_SignerInfo_set_cmp_func(sk, cmp) ((sk_CMS_SignerInfo_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_compfunc_type(cmp)))
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(CMS_RecipientEncryptedKey, CMS_RecipientEncryptedKey, CMS_RecipientEncryptedKey)
|
||||
#define sk_CMS_RecipientEncryptedKey_num(sk) OPENSSL_sk_num(ossl_check_const_CMS_RecipientEncryptedKey_sk_type(sk))
|
||||
#define sk_CMS_RecipientEncryptedKey_value(sk, idx) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_value(ossl_check_const_CMS_RecipientEncryptedKey_sk_type(sk), (idx)))
|
||||
#define sk_CMS_RecipientEncryptedKey_new(cmp) ((STACK_OF(CMS_RecipientEncryptedKey) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new(ossl_check_CMS_RecipientEncryptedKey_compfunc_type(cmp)), sk_CMS_RecipientEncryptedKey_cmpfunc_thunk))
|
||||
#define sk_CMS_RecipientEncryptedKey_new_null() ((STACK_OF(CMS_RecipientEncryptedKey) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_CMS_RecipientEncryptedKey_freefunc_thunk))
|
||||
#define sk_CMS_RecipientEncryptedKey_new_reserve(cmp, n) ((STACK_OF(CMS_RecipientEncryptedKey) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new_reserve(ossl_check_CMS_RecipientEncryptedKey_compfunc_type(cmp), (n)), sk_CMS_RecipientEncryptedKey_cmpfunc_thunk))
|
||||
#define sk_CMS_RecipientEncryptedKey_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), (n))
|
||||
#define sk_CMS_RecipientEncryptedKey_free(sk) OPENSSL_sk_free(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk))
|
||||
#define sk_CMS_RecipientEncryptedKey_zero(sk) OPENSSL_sk_zero(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk))
|
||||
#define sk_CMS_RecipientEncryptedKey_delete(sk, i) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_delete(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), (i)))
|
||||
#define sk_CMS_RecipientEncryptedKey_delete_ptr(sk, ptr) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_delete_ptr(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr)))
|
||||
#define sk_CMS_RecipientEncryptedKey_push(sk, ptr) OPENSSL_sk_push(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr))
|
||||
#define sk_CMS_RecipientEncryptedKey_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr))
|
||||
#define sk_CMS_RecipientEncryptedKey_pop(sk) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_pop(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk)))
|
||||
#define sk_CMS_RecipientEncryptedKey_shift(sk) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_shift(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk)))
|
||||
#define sk_CMS_RecipientEncryptedKey_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_freefunc_type(freefunc))
|
||||
#define sk_CMS_RecipientEncryptedKey_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr), (idx))
|
||||
#define sk_CMS_RecipientEncryptedKey_set(sk, idx, ptr) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_set(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), (idx), ossl_check_CMS_RecipientEncryptedKey_type(ptr)))
|
||||
#define sk_CMS_RecipientEncryptedKey_find(sk, ptr) OPENSSL_sk_find(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr))
|
||||
#define sk_CMS_RecipientEncryptedKey_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr))
|
||||
#define sk_CMS_RecipientEncryptedKey_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr), pnum)
|
||||
#define sk_CMS_RecipientEncryptedKey_sort(sk) OPENSSL_sk_sort(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk))
|
||||
#define sk_CMS_RecipientEncryptedKey_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_CMS_RecipientEncryptedKey_sk_type(sk))
|
||||
#define sk_CMS_RecipientEncryptedKey_dup(sk) ((STACK_OF(CMS_RecipientEncryptedKey) *)OPENSSL_sk_dup(ossl_check_const_CMS_RecipientEncryptedKey_sk_type(sk)))
|
||||
#define sk_CMS_RecipientEncryptedKey_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CMS_RecipientEncryptedKey) *)OPENSSL_sk_deep_copy(ossl_check_const_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_copyfunc_type(copyfunc), ossl_check_CMS_RecipientEncryptedKey_freefunc_type(freefunc)))
|
||||
#define sk_CMS_RecipientEncryptedKey_set_cmp_func(sk, cmp) ((sk_CMS_RecipientEncryptedKey_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_compfunc_type(cmp)))
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(CMS_RecipientInfo, CMS_RecipientInfo, CMS_RecipientInfo)
|
||||
#define sk_CMS_RecipientInfo_num(sk) OPENSSL_sk_num(ossl_check_const_CMS_RecipientInfo_sk_type(sk))
|
||||
#define sk_CMS_RecipientInfo_value(sk, idx) ((CMS_RecipientInfo *)OPENSSL_sk_value(ossl_check_const_CMS_RecipientInfo_sk_type(sk), (idx)))
|
||||
#define sk_CMS_RecipientInfo_new(cmp) ((STACK_OF(CMS_RecipientInfo) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new(ossl_check_CMS_RecipientInfo_compfunc_type(cmp)), sk_CMS_RecipientInfo_cmpfunc_thunk))
|
||||
#define sk_CMS_RecipientInfo_new_null() ((STACK_OF(CMS_RecipientInfo) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_CMS_RecipientInfo_freefunc_thunk))
|
||||
#define sk_CMS_RecipientInfo_new_reserve(cmp, n) ((STACK_OF(CMS_RecipientInfo) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new_reserve(ossl_check_CMS_RecipientInfo_compfunc_type(cmp), (n)), sk_CMS_RecipientInfo_cmpfunc_thunk))
|
||||
#define sk_CMS_RecipientInfo_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_CMS_RecipientInfo_sk_type(sk), (n))
|
||||
#define sk_CMS_RecipientInfo_free(sk) OPENSSL_sk_free(ossl_check_CMS_RecipientInfo_sk_type(sk))
|
||||
#define sk_CMS_RecipientInfo_zero(sk) OPENSSL_sk_zero(ossl_check_CMS_RecipientInfo_sk_type(sk))
|
||||
#define sk_CMS_RecipientInfo_delete(sk, i) ((CMS_RecipientInfo *)OPENSSL_sk_delete(ossl_check_CMS_RecipientInfo_sk_type(sk), (i)))
|
||||
#define sk_CMS_RecipientInfo_delete_ptr(sk, ptr) ((CMS_RecipientInfo *)OPENSSL_sk_delete_ptr(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr)))
|
||||
#define sk_CMS_RecipientInfo_push(sk, ptr) OPENSSL_sk_push(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr))
|
||||
#define sk_CMS_RecipientInfo_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr))
|
||||
#define sk_CMS_RecipientInfo_pop(sk) ((CMS_RecipientInfo *)OPENSSL_sk_pop(ossl_check_CMS_RecipientInfo_sk_type(sk)))
|
||||
#define sk_CMS_RecipientInfo_shift(sk) ((CMS_RecipientInfo *)OPENSSL_sk_shift(ossl_check_CMS_RecipientInfo_sk_type(sk)))
|
||||
#define sk_CMS_RecipientInfo_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_freefunc_type(freefunc))
|
||||
#define sk_CMS_RecipientInfo_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr), (idx))
|
||||
#define sk_CMS_RecipientInfo_set(sk, idx, ptr) ((CMS_RecipientInfo *)OPENSSL_sk_set(ossl_check_CMS_RecipientInfo_sk_type(sk), (idx), ossl_check_CMS_RecipientInfo_type(ptr)))
|
||||
#define sk_CMS_RecipientInfo_find(sk, ptr) OPENSSL_sk_find(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr))
|
||||
#define sk_CMS_RecipientInfo_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr))
|
||||
#define sk_CMS_RecipientInfo_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr), pnum)
|
||||
#define sk_CMS_RecipientInfo_sort(sk) OPENSSL_sk_sort(ossl_check_CMS_RecipientInfo_sk_type(sk))
|
||||
#define sk_CMS_RecipientInfo_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_CMS_RecipientInfo_sk_type(sk))
|
||||
#define sk_CMS_RecipientInfo_dup(sk) ((STACK_OF(CMS_RecipientInfo) *)OPENSSL_sk_dup(ossl_check_const_CMS_RecipientInfo_sk_type(sk)))
|
||||
#define sk_CMS_RecipientInfo_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CMS_RecipientInfo) *)OPENSSL_sk_deep_copy(ossl_check_const_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_copyfunc_type(copyfunc), ossl_check_CMS_RecipientInfo_freefunc_type(freefunc)))
|
||||
#define sk_CMS_RecipientInfo_set_cmp_func(sk, cmp) ((sk_CMS_RecipientInfo_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_compfunc_type(cmp)))
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(CMS_RevocationInfoChoice, CMS_RevocationInfoChoice, CMS_RevocationInfoChoice)
|
||||
#define sk_CMS_RevocationInfoChoice_num(sk) OPENSSL_sk_num(ossl_check_const_CMS_RevocationInfoChoice_sk_type(sk))
|
||||
#define sk_CMS_RevocationInfoChoice_value(sk, idx) ((CMS_RevocationInfoChoice *)OPENSSL_sk_value(ossl_check_const_CMS_RevocationInfoChoice_sk_type(sk), (idx)))
|
||||
#define sk_CMS_RevocationInfoChoice_new(cmp) ((STACK_OF(CMS_RevocationInfoChoice) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new(ossl_check_CMS_RevocationInfoChoice_compfunc_type(cmp)), sk_CMS_RevocationInfoChoice_cmpfunc_thunk))
|
||||
#define sk_CMS_RevocationInfoChoice_new_null() ((STACK_OF(CMS_RevocationInfoChoice) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_CMS_RevocationInfoChoice_freefunc_thunk))
|
||||
#define sk_CMS_RevocationInfoChoice_new_reserve(cmp, n) ((STACK_OF(CMS_RevocationInfoChoice) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new_reserve(ossl_check_CMS_RevocationInfoChoice_compfunc_type(cmp), (n)), sk_CMS_RevocationInfoChoice_cmpfunc_thunk))
|
||||
#define sk_CMS_RevocationInfoChoice_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), (n))
|
||||
#define sk_CMS_RevocationInfoChoice_free(sk) OPENSSL_sk_free(ossl_check_CMS_RevocationInfoChoice_sk_type(sk))
|
||||
#define sk_CMS_RevocationInfoChoice_zero(sk) OPENSSL_sk_zero(ossl_check_CMS_RevocationInfoChoice_sk_type(sk))
|
||||
#define sk_CMS_RevocationInfoChoice_delete(sk, i) ((CMS_RevocationInfoChoice *)OPENSSL_sk_delete(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), (i)))
|
||||
#define sk_CMS_RevocationInfoChoice_delete_ptr(sk, ptr) ((CMS_RevocationInfoChoice *)OPENSSL_sk_delete_ptr(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr)))
|
||||
#define sk_CMS_RevocationInfoChoice_push(sk, ptr) OPENSSL_sk_push(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr))
|
||||
#define sk_CMS_RevocationInfoChoice_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr))
|
||||
#define sk_CMS_RevocationInfoChoice_pop(sk) ((CMS_RevocationInfoChoice *)OPENSSL_sk_pop(ossl_check_CMS_RevocationInfoChoice_sk_type(sk)))
|
||||
#define sk_CMS_RevocationInfoChoice_shift(sk) ((CMS_RevocationInfoChoice *)OPENSSL_sk_shift(ossl_check_CMS_RevocationInfoChoice_sk_type(sk)))
|
||||
#define sk_CMS_RevocationInfoChoice_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_freefunc_type(freefunc))
|
||||
#define sk_CMS_RevocationInfoChoice_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr), (idx))
|
||||
#define sk_CMS_RevocationInfoChoice_set(sk, idx, ptr) ((CMS_RevocationInfoChoice *)OPENSSL_sk_set(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), (idx), ossl_check_CMS_RevocationInfoChoice_type(ptr)))
|
||||
#define sk_CMS_RevocationInfoChoice_find(sk, ptr) OPENSSL_sk_find(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr))
|
||||
#define sk_CMS_RevocationInfoChoice_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr))
|
||||
#define sk_CMS_RevocationInfoChoice_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr), pnum)
|
||||
#define sk_CMS_RevocationInfoChoice_sort(sk) OPENSSL_sk_sort(ossl_check_CMS_RevocationInfoChoice_sk_type(sk))
|
||||
#define sk_CMS_RevocationInfoChoice_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_CMS_RevocationInfoChoice_sk_type(sk))
|
||||
#define sk_CMS_RevocationInfoChoice_dup(sk) ((STACK_OF(CMS_RevocationInfoChoice) *)OPENSSL_sk_dup(ossl_check_const_CMS_RevocationInfoChoice_sk_type(sk)))
|
||||
#define sk_CMS_RevocationInfoChoice_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CMS_RevocationInfoChoice) *)OPENSSL_sk_deep_copy(ossl_check_const_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_copyfunc_type(copyfunc), ossl_check_CMS_RevocationInfoChoice_freefunc_type(freefunc)))
|
||||
#define sk_CMS_RevocationInfoChoice_set_cmp_func(sk, cmp) ((sk_CMS_RevocationInfoChoice_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_compfunc_type(cmp)))
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
DECLARE_ASN1_ITEM(CMS_EnvelopedData)
|
||||
DECLARE_ASN1_ALLOC_FUNCTIONS(CMS_SignedData)
|
||||
DECLARE_ASN1_FUNCTIONS(CMS_ContentInfo)
|
||||
DECLARE_ASN1_FUNCTIONS(CMS_ReceiptRequest)
|
||||
DECLARE_ASN1_PRINT_FUNCTION(CMS_ContentInfo)
|
||||
|
||||
# define CMS_SIGNERINFO_ISSUER_SERIAL 0
|
||||
# define CMS_SIGNERINFO_KEYIDENTIFIER 1
|
||||
DECLARE_ASN1_DUP_FUNCTION(CMS_EnvelopedData)
|
||||
|
||||
# define CMS_RECIPINFO_NONE -1
|
||||
# define CMS_RECIPINFO_TRANS 0
|
||||
# define CMS_RECIPINFO_AGREE 1
|
||||
# define CMS_RECIPINFO_KEK 2
|
||||
# define CMS_RECIPINFO_PASS 3
|
||||
# define CMS_RECIPINFO_OTHER 4
|
||||
CMS_ContentInfo *CMS_ContentInfo_new_ex(OSSL_LIB_CTX *libctx, const char *propq);
|
||||
|
||||
#define CMS_SIGNERINFO_ISSUER_SERIAL 0
|
||||
#define CMS_SIGNERINFO_KEYIDENTIFIER 1
|
||||
|
||||
#define CMS_RECIPINFO_NONE -1
|
||||
#define CMS_RECIPINFO_TRANS 0
|
||||
#define CMS_RECIPINFO_AGREE 1
|
||||
#define CMS_RECIPINFO_KEK 2
|
||||
#define CMS_RECIPINFO_PASS 3
|
||||
#define CMS_RECIPINFO_OTHER 4
|
||||
#define CMS_RECIPINFO_KEM 5
|
||||
|
||||
/* S/MIME related flags */
|
||||
|
||||
# define CMS_TEXT 0x1
|
||||
# define CMS_NOCERTS 0x2
|
||||
# define CMS_NO_CONTENT_VERIFY 0x4
|
||||
# define CMS_NO_ATTR_VERIFY 0x8
|
||||
# define CMS_NOSIGS \
|
||||
(CMS_NO_CONTENT_VERIFY|CMS_NO_ATTR_VERIFY)
|
||||
# define CMS_NOINTERN 0x10
|
||||
# define CMS_NO_SIGNER_CERT_VERIFY 0x20
|
||||
# define CMS_NOVERIFY 0x20
|
||||
# define CMS_DETACHED 0x40
|
||||
# define CMS_BINARY 0x80
|
||||
# define CMS_NOATTR 0x100
|
||||
# define CMS_NOSMIMECAP 0x200
|
||||
# define CMS_NOOLDMIMETYPE 0x400
|
||||
# define CMS_CRLFEOL 0x800
|
||||
# define CMS_STREAM 0x1000
|
||||
# define CMS_NOCRL 0x2000
|
||||
# define CMS_PARTIAL 0x4000
|
||||
# define CMS_REUSE_DIGEST 0x8000
|
||||
# define CMS_USE_KEYID 0x10000
|
||||
# define CMS_DEBUG_DECRYPT 0x20000
|
||||
# define CMS_KEY_PARAM 0x40000
|
||||
# define CMS_ASCIICRLF 0x80000
|
||||
#define CMS_TEXT 0x1
|
||||
#define CMS_NOCERTS 0x2
|
||||
#define CMS_NO_CONTENT_VERIFY 0x4
|
||||
#define CMS_NO_ATTR_VERIFY 0x8
|
||||
#define CMS_NOSIGS \
|
||||
(CMS_NO_CONTENT_VERIFY | CMS_NO_ATTR_VERIFY)
|
||||
#define CMS_NOINTERN 0x10
|
||||
#define CMS_NO_SIGNER_CERT_VERIFY 0x20
|
||||
#define CMS_NOVERIFY 0x20
|
||||
#define CMS_DETACHED 0x40
|
||||
#define CMS_BINARY 0x80
|
||||
#define CMS_NOATTR 0x100
|
||||
#define CMS_NOSMIMECAP 0x200
|
||||
#define CMS_NOOLDMIMETYPE 0x400
|
||||
#define CMS_CRLFEOL 0x800
|
||||
#define CMS_STREAM 0x1000
|
||||
#define CMS_NOCRL 0x2000
|
||||
#define CMS_PARTIAL 0x4000
|
||||
#define CMS_REUSE_DIGEST 0x8000
|
||||
#define CMS_USE_KEYID 0x10000
|
||||
#define CMS_DEBUG_DECRYPT 0x20000
|
||||
#define CMS_KEY_PARAM 0x40000
|
||||
#define CMS_ASCIICRLF 0x80000
|
||||
#define CMS_CADES 0x100000
|
||||
#define CMS_USE_ORIGINATOR_KEYID 0x200000
|
||||
#define CMS_NO_SIGNING_TIME 0x400000
|
||||
|
||||
const ASN1_OBJECT *CMS_get0_type(const CMS_ContentInfo *cms);
|
||||
|
||||
BIO *CMS_dataInit(CMS_ContentInfo *cms, BIO *icont);
|
||||
int CMS_dataFinal(CMS_ContentInfo *cms, BIO *bio);
|
||||
int CMS_dataFinal_ex(CMS_ContentInfo *cms, BIO *bio, BIO *data);
|
||||
|
||||
ASN1_OCTET_STRING **CMS_get0_content(CMS_ContentInfo *cms);
|
||||
int CMS_is_detached(CMS_ContentInfo *cms);
|
||||
int CMS_set_detached(CMS_ContentInfo *cms, int detached);
|
||||
|
||||
# ifdef HEADER_PEM_H
|
||||
DECLARE_PEM_rw_const(CMS, CMS_ContentInfo)
|
||||
# endif
|
||||
#ifdef OPENSSL_PEM_H
|
||||
DECLARE_PEM_rw(CMS, CMS_ContentInfo)
|
||||
#endif
|
||||
int CMS_stream(unsigned char ***boundary, CMS_ContentInfo *cms);
|
||||
CMS_ContentInfo *d2i_CMS_bio(BIO *bp, CMS_ContentInfo **cms);
|
||||
int i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms);
|
||||
@@ -93,114 +223,146 @@ int i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms);
|
||||
BIO *BIO_new_CMS(BIO *out, CMS_ContentInfo *cms);
|
||||
int i2d_CMS_bio_stream(BIO *out, CMS_ContentInfo *cms, BIO *in, int flags);
|
||||
int PEM_write_bio_CMS_stream(BIO *out, CMS_ContentInfo *cms, BIO *in,
|
||||
int flags);
|
||||
int flags);
|
||||
CMS_ContentInfo *SMIME_read_CMS(BIO *bio, BIO **bcont);
|
||||
CMS_ContentInfo *SMIME_read_CMS_ex(BIO *bio, int flags, BIO **bcont, CMS_ContentInfo **ci);
|
||||
int SMIME_write_CMS(BIO *bio, CMS_ContentInfo *cms, BIO *data, int flags);
|
||||
|
||||
int CMS_final(CMS_ContentInfo *cms, BIO *data, BIO *dcont,
|
||||
unsigned int flags);
|
||||
unsigned int flags);
|
||||
int CMS_final_digest(CMS_ContentInfo *cms,
|
||||
const unsigned char *md, unsigned int mdlen, BIO *dcont,
|
||||
unsigned int flags);
|
||||
|
||||
CMS_ContentInfo *CMS_sign(X509 *signcert, EVP_PKEY *pkey,
|
||||
STACK_OF(X509) *certs, BIO *data,
|
||||
unsigned int flags);
|
||||
const STACK_OF(X509) *certs, BIO *data, unsigned int flags);
|
||||
CMS_ContentInfo *CMS_sign_ex(X509 *signcert, EVP_PKEY *pkey,
|
||||
const STACK_OF(X509) *certs, BIO *data,
|
||||
unsigned int flags, OSSL_LIB_CTX *libctx, const char *propq);
|
||||
|
||||
CMS_ContentInfo *CMS_sign_receipt(CMS_SignerInfo *si,
|
||||
X509 *signcert, EVP_PKEY *pkey,
|
||||
STACK_OF(X509) *certs, unsigned int flags);
|
||||
CMS_ContentInfo *CMS_sign_receipt(CMS_SignerInfo *si, X509 *signcert,
|
||||
EVP_PKEY *pkey, const STACK_OF(X509) *certs, unsigned int flags);
|
||||
|
||||
int CMS_data(CMS_ContentInfo *cms, BIO *out, unsigned int flags);
|
||||
CMS_ContentInfo *CMS_data_create(BIO *in, unsigned int flags);
|
||||
CMS_ContentInfo *CMS_data_create_ex(BIO *in, unsigned int flags,
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
|
||||
int CMS_digest_verify(CMS_ContentInfo *cms, BIO *dcont, BIO *out,
|
||||
unsigned int flags);
|
||||
unsigned int flags);
|
||||
CMS_ContentInfo *CMS_digest_create(BIO *in, const EVP_MD *md,
|
||||
unsigned int flags);
|
||||
unsigned int flags);
|
||||
CMS_ContentInfo *CMS_digest_create_ex(BIO *in, const EVP_MD *md,
|
||||
unsigned int flags, OSSL_LIB_CTX *libctx,
|
||||
const char *propq);
|
||||
|
||||
int CMS_EncryptedData_decrypt(CMS_ContentInfo *cms,
|
||||
const unsigned char *key, size_t keylen,
|
||||
BIO *dcont, BIO *out, unsigned int flags);
|
||||
|
||||
const unsigned char *key, size_t keylen,
|
||||
BIO *dcont, BIO *out, unsigned int flags);
|
||||
CMS_ContentInfo *CMS_EncryptedData_encrypt(BIO *in, const EVP_CIPHER *cipher,
|
||||
const unsigned char *key,
|
||||
size_t keylen, unsigned int flags);
|
||||
const unsigned char *key,
|
||||
size_t keylen, unsigned int flags);
|
||||
CMS_ContentInfo *CMS_EncryptedData_encrypt_ex(BIO *in, const EVP_CIPHER *cipher,
|
||||
const unsigned char *key,
|
||||
size_t keylen, unsigned int flags,
|
||||
OSSL_LIB_CTX *libctx,
|
||||
const char *propq);
|
||||
|
||||
int CMS_EncryptedData_set1_key(CMS_ContentInfo *cms, const EVP_CIPHER *ciph,
|
||||
const unsigned char *key, size_t keylen);
|
||||
const unsigned char *key, size_t keylen);
|
||||
|
||||
int CMS_verify(CMS_ContentInfo *cms, STACK_OF(X509) *certs,
|
||||
X509_STORE *store, BIO *dcont, BIO *out, unsigned int flags);
|
||||
int CMS_verify(CMS_ContentInfo *cms, const STACK_OF(X509) *certs,
|
||||
X509_STORE *store, BIO *dcont, BIO *out, unsigned int flags);
|
||||
|
||||
int CMS_verify_receipt(CMS_ContentInfo *rcms, CMS_ContentInfo *ocms,
|
||||
STACK_OF(X509) *certs,
|
||||
X509_STORE *store, unsigned int flags);
|
||||
const STACK_OF(X509) *certs, X509_STORE *store, unsigned int flags);
|
||||
|
||||
STACK_OF(X509) *CMS_get0_signers(CMS_ContentInfo *cms);
|
||||
|
||||
CMS_ContentInfo *CMS_encrypt(STACK_OF(X509) *certs, BIO *in,
|
||||
const EVP_CIPHER *cipher, unsigned int flags);
|
||||
CMS_ContentInfo *CMS_encrypt(const STACK_OF(X509) *certs, BIO *in,
|
||||
const EVP_CIPHER *cipher, unsigned int flags);
|
||||
CMS_ContentInfo *CMS_encrypt_ex(const STACK_OF(X509) *certs, BIO *in,
|
||||
const EVP_CIPHER *cipher, unsigned int flags,
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
|
||||
int CMS_decrypt(CMS_ContentInfo *cms, EVP_PKEY *pkey, X509 *cert,
|
||||
BIO *dcont, BIO *out, unsigned int flags);
|
||||
BIO *dcont, BIO *out, unsigned int flags);
|
||||
|
||||
int CMS_decrypt_set1_pkey(CMS_ContentInfo *cms, EVP_PKEY *pk, X509 *cert);
|
||||
int CMS_decrypt_set1_pkey_and_peer(CMS_ContentInfo *cms, EVP_PKEY *pk,
|
||||
X509 *cert, X509 *peer);
|
||||
int CMS_decrypt_set1_key(CMS_ContentInfo *cms,
|
||||
unsigned char *key, size_t keylen,
|
||||
const unsigned char *id, size_t idlen);
|
||||
unsigned char *key, size_t keylen,
|
||||
const unsigned char *id, size_t idlen);
|
||||
int CMS_decrypt_set1_password(CMS_ContentInfo *cms,
|
||||
unsigned char *pass, ossl_ssize_t passlen);
|
||||
unsigned char *pass, ossl_ssize_t passlen);
|
||||
|
||||
STACK_OF(CMS_RecipientInfo) *CMS_get0_RecipientInfos(CMS_ContentInfo *cms);
|
||||
int CMS_RecipientInfo_type(CMS_RecipientInfo *ri);
|
||||
EVP_PKEY_CTX *CMS_RecipientInfo_get0_pkey_ctx(CMS_RecipientInfo *ri);
|
||||
CMS_ContentInfo *CMS_AuthEnvelopedData_create(const EVP_CIPHER *cipher);
|
||||
CMS_ContentInfo *
|
||||
CMS_AuthEnvelopedData_create_ex(const EVP_CIPHER *cipher, OSSL_LIB_CTX *libctx,
|
||||
const char *propq);
|
||||
CMS_ContentInfo *CMS_EnvelopedData_create(const EVP_CIPHER *cipher);
|
||||
CMS_ContentInfo *CMS_EnvelopedData_create_ex(const EVP_CIPHER *cipher,
|
||||
OSSL_LIB_CTX *libctx,
|
||||
const char *propq);
|
||||
BIO *CMS_EnvelopedData_decrypt(CMS_EnvelopedData *env, BIO *detached_data,
|
||||
EVP_PKEY *pkey, X509 *cert,
|
||||
ASN1_OCTET_STRING *secret, unsigned int flags,
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
|
||||
CMS_RecipientInfo *CMS_add1_recipient_cert(CMS_ContentInfo *cms,
|
||||
X509 *recip, unsigned int flags);
|
||||
X509 *recip, unsigned int flags);
|
||||
CMS_RecipientInfo *CMS_add1_recipient(CMS_ContentInfo *cms, X509 *recip,
|
||||
EVP_PKEY *originatorPrivKey, X509 *originator, unsigned int flags);
|
||||
int CMS_RecipientInfo_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pkey);
|
||||
int CMS_RecipientInfo_ktri_cert_cmp(CMS_RecipientInfo *ri, X509 *cert);
|
||||
int CMS_RecipientInfo_ktri_get0_algs(CMS_RecipientInfo *ri,
|
||||
EVP_PKEY **pk, X509 **recip,
|
||||
X509_ALGOR **palg);
|
||||
EVP_PKEY **pk, X509 **recip,
|
||||
X509_ALGOR **palg);
|
||||
int CMS_RecipientInfo_ktri_get0_signer_id(CMS_RecipientInfo *ri,
|
||||
ASN1_OCTET_STRING **keyid,
|
||||
X509_NAME **issuer,
|
||||
ASN1_INTEGER **sno);
|
||||
ASN1_OCTET_STRING **keyid,
|
||||
X509_NAME **issuer,
|
||||
ASN1_INTEGER **sno);
|
||||
|
||||
CMS_RecipientInfo *CMS_add0_recipient_key(CMS_ContentInfo *cms, int nid,
|
||||
unsigned char *key, size_t keylen,
|
||||
unsigned char *id, size_t idlen,
|
||||
ASN1_GENERALIZEDTIME *date,
|
||||
ASN1_OBJECT *otherTypeId,
|
||||
ASN1_TYPE *otherType);
|
||||
unsigned char *key, size_t keylen,
|
||||
unsigned char *id, size_t idlen,
|
||||
ASN1_GENERALIZEDTIME *date,
|
||||
ASN1_OBJECT *otherTypeId,
|
||||
ASN1_TYPE *otherType);
|
||||
|
||||
int CMS_RecipientInfo_kekri_get0_id(CMS_RecipientInfo *ri,
|
||||
X509_ALGOR **palg,
|
||||
ASN1_OCTET_STRING **pid,
|
||||
ASN1_GENERALIZEDTIME **pdate,
|
||||
ASN1_OBJECT **potherid,
|
||||
ASN1_TYPE **pothertype);
|
||||
X509_ALGOR **palg,
|
||||
ASN1_OCTET_STRING **pid,
|
||||
ASN1_GENERALIZEDTIME **pdate,
|
||||
ASN1_OBJECT **potherid,
|
||||
ASN1_TYPE **pothertype);
|
||||
|
||||
int CMS_RecipientInfo_set0_key(CMS_RecipientInfo *ri,
|
||||
unsigned char *key, size_t keylen);
|
||||
unsigned char *key, size_t keylen);
|
||||
|
||||
int CMS_RecipientInfo_kekri_id_cmp(CMS_RecipientInfo *ri,
|
||||
const unsigned char *id, size_t idlen);
|
||||
const unsigned char *id, size_t idlen);
|
||||
|
||||
int CMS_RecipientInfo_set0_password(CMS_RecipientInfo *ri,
|
||||
unsigned char *pass,
|
||||
ossl_ssize_t passlen);
|
||||
unsigned char *pass,
|
||||
ossl_ssize_t passlen);
|
||||
|
||||
CMS_RecipientInfo *CMS_add0_recipient_password(CMS_ContentInfo *cms,
|
||||
int iter, int wrap_nid,
|
||||
int pbe_nid,
|
||||
unsigned char *pass,
|
||||
ossl_ssize_t passlen,
|
||||
const EVP_CIPHER *kekciph);
|
||||
int iter, int wrap_nid,
|
||||
int pbe_nid,
|
||||
unsigned char *pass,
|
||||
ossl_ssize_t passlen,
|
||||
const EVP_CIPHER *kekciph);
|
||||
|
||||
int CMS_RecipientInfo_decrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri);
|
||||
int CMS_RecipientInfo_encrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri);
|
||||
int CMS_RecipientInfo_encrypt(const CMS_ContentInfo *cms, CMS_RecipientInfo *ri);
|
||||
|
||||
int CMS_uncompress(CMS_ContentInfo *cms, BIO *dcont, BIO *out,
|
||||
unsigned int flags);
|
||||
unsigned int flags);
|
||||
CMS_ContentInfo *CMS_compress(BIO *in, int comp_nid, unsigned int flags);
|
||||
|
||||
int CMS_set1_eContentType(CMS_ContentInfo *cms, const ASN1_OBJECT *oid);
|
||||
@@ -218,122 +380,143 @@ STACK_OF(X509_CRL) *CMS_get1_crls(CMS_ContentInfo *cms);
|
||||
|
||||
int CMS_SignedData_init(CMS_ContentInfo *cms);
|
||||
CMS_SignerInfo *CMS_add1_signer(CMS_ContentInfo *cms,
|
||||
X509 *signer, EVP_PKEY *pk, const EVP_MD *md,
|
||||
unsigned int flags);
|
||||
X509 *signer, EVP_PKEY *pk, const EVP_MD *md,
|
||||
unsigned int flags);
|
||||
EVP_PKEY_CTX *CMS_SignerInfo_get0_pkey_ctx(CMS_SignerInfo *si);
|
||||
EVP_MD_CTX *CMS_SignerInfo_get0_md_ctx(CMS_SignerInfo *si);
|
||||
STACK_OF(CMS_SignerInfo) *CMS_get0_SignerInfos(CMS_ContentInfo *cms);
|
||||
|
||||
void CMS_SignerInfo_set1_signer_cert(CMS_SignerInfo *si, X509 *signer);
|
||||
int CMS_SignerInfo_get0_signer_id(CMS_SignerInfo *si,
|
||||
ASN1_OCTET_STRING **keyid,
|
||||
X509_NAME **issuer, ASN1_INTEGER **sno);
|
||||
ASN1_OCTET_STRING **keyid,
|
||||
X509_NAME **issuer, ASN1_INTEGER **sno);
|
||||
int CMS_SignerInfo_cert_cmp(CMS_SignerInfo *si, X509 *cert);
|
||||
int CMS_set1_signers_certs(CMS_ContentInfo *cms, STACK_OF(X509) *certs,
|
||||
unsigned int flags);
|
||||
int CMS_set1_signers_certs(CMS_ContentInfo *cms, const STACK_OF(X509) *certs,
|
||||
unsigned int flags);
|
||||
void CMS_SignerInfo_get0_algs(CMS_SignerInfo *si, EVP_PKEY **pk,
|
||||
X509 **signer, X509_ALGOR **pdig,
|
||||
X509_ALGOR **psig);
|
||||
X509 **signer, X509_ALGOR **pdig,
|
||||
X509_ALGOR **psig);
|
||||
ASN1_OCTET_STRING *CMS_SignerInfo_get0_signature(CMS_SignerInfo *si);
|
||||
int CMS_SignerInfo_sign(CMS_SignerInfo *si);
|
||||
int CMS_SignerInfo_verify(CMS_SignerInfo *si);
|
||||
int CMS_SignerInfo_verify_content(CMS_SignerInfo *si, BIO *chain);
|
||||
int CMS_SignerInfo_verify_ex(CMS_SignerInfo *si, BIO *chain, BIO *data);
|
||||
BIO *CMS_SignedData_verify(CMS_SignedData *sd, BIO *detached_data,
|
||||
const STACK_OF(X509) *scerts, X509_STORE *store,
|
||||
const STACK_OF(X509) *extra, const STACK_OF(X509_CRL) *crls,
|
||||
unsigned int flags,
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
|
||||
int CMS_add_smimecap(CMS_SignerInfo *si, STACK_OF(X509_ALGOR) *algs);
|
||||
int CMS_add_simple_smimecap(STACK_OF(X509_ALGOR) **algs,
|
||||
int algnid, int keysize);
|
||||
int algnid, int keysize);
|
||||
int CMS_add_standard_smimecap(STACK_OF(X509_ALGOR) **smcap);
|
||||
|
||||
int CMS_signed_get_attr_count(const CMS_SignerInfo *si);
|
||||
int CMS_signed_get_attr_by_NID(const CMS_SignerInfo *si, int nid,
|
||||
int lastpos);
|
||||
int lastpos);
|
||||
int CMS_signed_get_attr_by_OBJ(const CMS_SignerInfo *si, const ASN1_OBJECT *obj,
|
||||
int lastpos);
|
||||
int lastpos);
|
||||
X509_ATTRIBUTE *CMS_signed_get_attr(const CMS_SignerInfo *si, int loc);
|
||||
X509_ATTRIBUTE *CMS_signed_delete_attr(CMS_SignerInfo *si, int loc);
|
||||
int CMS_signed_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr);
|
||||
int CMS_signed_add1_attr_by_OBJ(CMS_SignerInfo *si,
|
||||
const ASN1_OBJECT *obj, int type,
|
||||
const void *bytes, int len);
|
||||
const ASN1_OBJECT *obj, int type,
|
||||
const void *bytes, int len);
|
||||
int CMS_signed_add1_attr_by_NID(CMS_SignerInfo *si,
|
||||
int nid, int type,
|
||||
const void *bytes, int len);
|
||||
int nid, int type,
|
||||
const void *bytes, int len);
|
||||
int CMS_signed_add1_attr_by_txt(CMS_SignerInfo *si,
|
||||
const char *attrname, int type,
|
||||
const void *bytes, int len);
|
||||
void *CMS_signed_get0_data_by_OBJ(CMS_SignerInfo *si, const ASN1_OBJECT *oid,
|
||||
int lastpos, int type);
|
||||
const char *attrname, int type,
|
||||
const void *bytes, int len);
|
||||
const void *CMS_signed_get0_data_by_OBJ(const CMS_SignerInfo *si,
|
||||
const ASN1_OBJECT *oid,
|
||||
int lastpos, int type);
|
||||
|
||||
int CMS_unsigned_get_attr_count(const CMS_SignerInfo *si);
|
||||
int CMS_unsigned_get_attr_by_NID(const CMS_SignerInfo *si, int nid,
|
||||
int lastpos);
|
||||
int lastpos);
|
||||
int CMS_unsigned_get_attr_by_OBJ(const CMS_SignerInfo *si,
|
||||
const ASN1_OBJECT *obj, int lastpos);
|
||||
const ASN1_OBJECT *obj, int lastpos);
|
||||
X509_ATTRIBUTE *CMS_unsigned_get_attr(const CMS_SignerInfo *si, int loc);
|
||||
X509_ATTRIBUTE *CMS_unsigned_delete_attr(CMS_SignerInfo *si, int loc);
|
||||
int CMS_unsigned_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr);
|
||||
int CMS_unsigned_add1_attr_by_OBJ(CMS_SignerInfo *si,
|
||||
const ASN1_OBJECT *obj, int type,
|
||||
const void *bytes, int len);
|
||||
const ASN1_OBJECT *obj, int type,
|
||||
const void *bytes, int len);
|
||||
int CMS_unsigned_add1_attr_by_NID(CMS_SignerInfo *si,
|
||||
int nid, int type,
|
||||
const void *bytes, int len);
|
||||
int nid, int type,
|
||||
const void *bytes, int len);
|
||||
int CMS_unsigned_add1_attr_by_txt(CMS_SignerInfo *si,
|
||||
const char *attrname, int type,
|
||||
const void *bytes, int len);
|
||||
void *CMS_unsigned_get0_data_by_OBJ(CMS_SignerInfo *si, ASN1_OBJECT *oid,
|
||||
int lastpos, int type);
|
||||
const char *attrname, int type,
|
||||
const void *bytes, int len);
|
||||
const void *CMS_unsigned_get0_data_by_OBJ(CMS_SignerInfo *si, ASN1_OBJECT *oid,
|
||||
int lastpos, int type);
|
||||
|
||||
int CMS_get1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest **prr);
|
||||
CMS_ReceiptRequest *CMS_ReceiptRequest_create0(unsigned char *id, int idlen,
|
||||
int allorfirst,
|
||||
STACK_OF(GENERAL_NAMES)
|
||||
*receiptList, STACK_OF(GENERAL_NAMES)
|
||||
*receiptsTo);
|
||||
CMS_ReceiptRequest *CMS_ReceiptRequest_create0(
|
||||
unsigned char *id, int idlen, int allorfirst,
|
||||
STACK_OF(GENERAL_NAMES) *receiptList,
|
||||
STACK_OF(GENERAL_NAMES) *receiptsTo);
|
||||
CMS_ReceiptRequest *CMS_ReceiptRequest_create0_ex(
|
||||
unsigned char *id, int idlen, int allorfirst,
|
||||
STACK_OF(GENERAL_NAMES) *receiptList,
|
||||
STACK_OF(GENERAL_NAMES) *receiptsTo,
|
||||
OSSL_LIB_CTX *libctx);
|
||||
|
||||
int CMS_add1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest *rr);
|
||||
void CMS_ReceiptRequest_get0_values(CMS_ReceiptRequest *rr,
|
||||
ASN1_STRING **pcid,
|
||||
int *pallorfirst,
|
||||
STACK_OF(GENERAL_NAMES) **plist,
|
||||
STACK_OF(GENERAL_NAMES) **prto);
|
||||
ASN1_STRING **pcid,
|
||||
int *pallorfirst,
|
||||
STACK_OF(GENERAL_NAMES) **plist,
|
||||
STACK_OF(GENERAL_NAMES) **prto);
|
||||
int CMS_RecipientInfo_kari_get0_alg(CMS_RecipientInfo *ri,
|
||||
X509_ALGOR **palg,
|
||||
ASN1_OCTET_STRING **pukm);
|
||||
X509_ALGOR **palg,
|
||||
ASN1_OCTET_STRING **pukm);
|
||||
STACK_OF(CMS_RecipientEncryptedKey)
|
||||
*CMS_RecipientInfo_kari_get0_reks(CMS_RecipientInfo *ri);
|
||||
|
||||
int CMS_RecipientInfo_kari_get0_orig_id(CMS_RecipientInfo *ri,
|
||||
X509_ALGOR **pubalg,
|
||||
ASN1_BIT_STRING **pubkey,
|
||||
ASN1_OCTET_STRING **keyid,
|
||||
X509_NAME **issuer,
|
||||
ASN1_INTEGER **sno);
|
||||
X509_ALGOR **pubalg,
|
||||
ASN1_BIT_STRING **pubkey,
|
||||
ASN1_OCTET_STRING **keyid,
|
||||
X509_NAME **issuer,
|
||||
ASN1_INTEGER **sno);
|
||||
|
||||
int CMS_RecipientInfo_kari_orig_id_cmp(CMS_RecipientInfo *ri, X509 *cert);
|
||||
|
||||
int CMS_RecipientEncryptedKey_get0_id(CMS_RecipientEncryptedKey *rek,
|
||||
ASN1_OCTET_STRING **keyid,
|
||||
ASN1_GENERALIZEDTIME **tm,
|
||||
CMS_OtherKeyAttribute **other,
|
||||
X509_NAME **issuer, ASN1_INTEGER **sno);
|
||||
ASN1_OCTET_STRING **keyid,
|
||||
ASN1_GENERALIZEDTIME **tm,
|
||||
CMS_OtherKeyAttribute **other,
|
||||
X509_NAME **issuer, ASN1_INTEGER **sno);
|
||||
int CMS_RecipientEncryptedKey_cert_cmp(CMS_RecipientEncryptedKey *rek,
|
||||
X509 *cert);
|
||||
X509 *cert);
|
||||
int CMS_RecipientInfo_kari_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pk);
|
||||
int CMS_RecipientInfo_kari_set0_pkey_and_peer(CMS_RecipientInfo *ri, EVP_PKEY *pk, X509 *peer);
|
||||
EVP_CIPHER_CTX *CMS_RecipientInfo_kari_get0_ctx(CMS_RecipientInfo *ri);
|
||||
int CMS_RecipientInfo_kari_decrypt(CMS_ContentInfo *cms,
|
||||
CMS_RecipientInfo *ri,
|
||||
CMS_RecipientEncryptedKey *rek);
|
||||
CMS_RecipientInfo *ri,
|
||||
CMS_RecipientEncryptedKey *rek);
|
||||
|
||||
int CMS_SharedInfo_encode(unsigned char **pder, X509_ALGOR *kekalg,
|
||||
ASN1_OCTET_STRING *ukm, int keylen);
|
||||
ASN1_OCTET_STRING *ukm, int keylen);
|
||||
|
||||
int CMS_RecipientInfo_kemri_cert_cmp(CMS_RecipientInfo *ri, X509 *cert);
|
||||
int CMS_RecipientInfo_kemri_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pk);
|
||||
EVP_CIPHER_CTX *CMS_RecipientInfo_kemri_get0_ctx(CMS_RecipientInfo *ri);
|
||||
X509_ALGOR *CMS_RecipientInfo_kemri_get0_kdf_alg(CMS_RecipientInfo *ri);
|
||||
int CMS_RecipientInfo_kemri_set_ukm(CMS_RecipientInfo *ri,
|
||||
const unsigned char *ukm,
|
||||
int ukmLength);
|
||||
|
||||
/* Backward compatibility for spelling errors. */
|
||||
# define CMS_R_UNKNOWN_DIGEST_ALGORITM CMS_R_UNKNOWN_DIGEST_ALGORITHM
|
||||
# define CMS_R_UNSUPPORTED_RECPIENTINFO_TYPE \
|
||||
#define CMS_R_UNKNOWN_DIGEST_ALGORITM CMS_R_UNKNOWN_DIGEST_ALGORITHM
|
||||
#define CMS_R_UNSUPPORTED_RECPIENTINFO_TYPE \
|
||||
CMS_R_UNSUPPORTED_RECIPIENTINFO_TYPE
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1,202 +1,128 @@
|
||||
/*
|
||||
* Generated by util/mkerr.pl DO NOT EDIT
|
||||
* Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 1995-2025 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (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
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#ifndef HEADER_CMSERR_H
|
||||
# define HEADER_CMSERR_H
|
||||
#ifndef OPENSSL_CMSERR_H
|
||||
#define OPENSSL_CMSERR_H
|
||||
#pragma once
|
||||
|
||||
# ifndef HEADER_SYMHACKS_H
|
||||
# include <openssl/symhacks.h>
|
||||
# endif
|
||||
#include <openssl/opensslconf.h>
|
||||
#include <openssl/symhacks.h>
|
||||
#include <openssl/cryptoerr_legacy.h>
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
|
||||
# ifndef OPENSSL_NO_CMS
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C"
|
||||
# endif
|
||||
int ERR_load_CMS_strings(void);
|
||||
|
||||
/*
|
||||
* CMS function codes.
|
||||
*/
|
||||
# define CMS_F_CHECK_CONTENT 99
|
||||
# define CMS_F_CMS_ADD0_CERT 164
|
||||
# define CMS_F_CMS_ADD0_RECIPIENT_KEY 100
|
||||
# define CMS_F_CMS_ADD0_RECIPIENT_PASSWORD 165
|
||||
# define CMS_F_CMS_ADD1_RECEIPTREQUEST 158
|
||||
# define CMS_F_CMS_ADD1_RECIPIENT_CERT 101
|
||||
# define CMS_F_CMS_ADD1_SIGNER 102
|
||||
# define CMS_F_CMS_ADD1_SIGNINGTIME 103
|
||||
# define CMS_F_CMS_COMPRESS 104
|
||||
# define CMS_F_CMS_COMPRESSEDDATA_CREATE 105
|
||||
# define CMS_F_CMS_COMPRESSEDDATA_INIT_BIO 106
|
||||
# define CMS_F_CMS_COPY_CONTENT 107
|
||||
# define CMS_F_CMS_COPY_MESSAGEDIGEST 108
|
||||
# define CMS_F_CMS_DATA 109
|
||||
# define CMS_F_CMS_DATAFINAL 110
|
||||
# define CMS_F_CMS_DATAINIT 111
|
||||
# define CMS_F_CMS_DECRYPT 112
|
||||
# define CMS_F_CMS_DECRYPT_SET1_KEY 113
|
||||
# define CMS_F_CMS_DECRYPT_SET1_PASSWORD 166
|
||||
# define CMS_F_CMS_DECRYPT_SET1_PKEY 114
|
||||
# define CMS_F_CMS_DIGESTALGORITHM_FIND_CTX 115
|
||||
# define CMS_F_CMS_DIGESTALGORITHM_INIT_BIO 116
|
||||
# define CMS_F_CMS_DIGESTEDDATA_DO_FINAL 117
|
||||
# define CMS_F_CMS_DIGEST_VERIFY 118
|
||||
# define CMS_F_CMS_ENCODE_RECEIPT 161
|
||||
# define CMS_F_CMS_ENCRYPT 119
|
||||
# define CMS_F_CMS_ENCRYPTEDCONTENT_INIT 179
|
||||
# define CMS_F_CMS_ENCRYPTEDCONTENT_INIT_BIO 120
|
||||
# define CMS_F_CMS_ENCRYPTEDDATA_DECRYPT 121
|
||||
# define CMS_F_CMS_ENCRYPTEDDATA_ENCRYPT 122
|
||||
# define CMS_F_CMS_ENCRYPTEDDATA_SET1_KEY 123
|
||||
# define CMS_F_CMS_ENVELOPEDDATA_CREATE 124
|
||||
# define CMS_F_CMS_ENVELOPEDDATA_INIT_BIO 125
|
||||
# define CMS_F_CMS_ENVELOPED_DATA_INIT 126
|
||||
# define CMS_F_CMS_ENV_ASN1_CTRL 171
|
||||
# define CMS_F_CMS_FINAL 127
|
||||
# define CMS_F_CMS_GET0_CERTIFICATE_CHOICES 128
|
||||
# define CMS_F_CMS_GET0_CONTENT 129
|
||||
# define CMS_F_CMS_GET0_ECONTENT_TYPE 130
|
||||
# define CMS_F_CMS_GET0_ENVELOPED 131
|
||||
# define CMS_F_CMS_GET0_REVOCATION_CHOICES 132
|
||||
# define CMS_F_CMS_GET0_SIGNED 133
|
||||
# define CMS_F_CMS_MSGSIGDIGEST_ADD1 162
|
||||
# define CMS_F_CMS_RECEIPTREQUEST_CREATE0 159
|
||||
# define CMS_F_CMS_RECEIPT_VERIFY 160
|
||||
# define CMS_F_CMS_RECIPIENTINFO_DECRYPT 134
|
||||
# define CMS_F_CMS_RECIPIENTINFO_ENCRYPT 169
|
||||
# define CMS_F_CMS_RECIPIENTINFO_KARI_ENCRYPT 178
|
||||
# define CMS_F_CMS_RECIPIENTINFO_KARI_GET0_ALG 175
|
||||
# define CMS_F_CMS_RECIPIENTINFO_KARI_GET0_ORIG_ID 173
|
||||
# define CMS_F_CMS_RECIPIENTINFO_KARI_GET0_REKS 172
|
||||
# define CMS_F_CMS_RECIPIENTINFO_KARI_ORIG_ID_CMP 174
|
||||
# define CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT 135
|
||||
# define CMS_F_CMS_RECIPIENTINFO_KEKRI_ENCRYPT 136
|
||||
# define CMS_F_CMS_RECIPIENTINFO_KEKRI_GET0_ID 137
|
||||
# define CMS_F_CMS_RECIPIENTINFO_KEKRI_ID_CMP 138
|
||||
# define CMS_F_CMS_RECIPIENTINFO_KTRI_CERT_CMP 139
|
||||
# define CMS_F_CMS_RECIPIENTINFO_KTRI_DECRYPT 140
|
||||
# define CMS_F_CMS_RECIPIENTINFO_KTRI_ENCRYPT 141
|
||||
# define CMS_F_CMS_RECIPIENTINFO_KTRI_GET0_ALGS 142
|
||||
# define CMS_F_CMS_RECIPIENTINFO_KTRI_GET0_SIGNER_ID 143
|
||||
# define CMS_F_CMS_RECIPIENTINFO_PWRI_CRYPT 167
|
||||
# define CMS_F_CMS_RECIPIENTINFO_SET0_KEY 144
|
||||
# define CMS_F_CMS_RECIPIENTINFO_SET0_PASSWORD 168
|
||||
# define CMS_F_CMS_RECIPIENTINFO_SET0_PKEY 145
|
||||
# define CMS_F_CMS_SD_ASN1_CTRL 170
|
||||
# define CMS_F_CMS_SET1_IAS 176
|
||||
# define CMS_F_CMS_SET1_KEYID 177
|
||||
# define CMS_F_CMS_SET1_SIGNERIDENTIFIER 146
|
||||
# define CMS_F_CMS_SET_DETACHED 147
|
||||
# define CMS_F_CMS_SIGN 148
|
||||
# define CMS_F_CMS_SIGNED_DATA_INIT 149
|
||||
# define CMS_F_CMS_SIGNERINFO_CONTENT_SIGN 150
|
||||
# define CMS_F_CMS_SIGNERINFO_SIGN 151
|
||||
# define CMS_F_CMS_SIGNERINFO_VERIFY 152
|
||||
# define CMS_F_CMS_SIGNERINFO_VERIFY_CERT 153
|
||||
# define CMS_F_CMS_SIGNERINFO_VERIFY_CONTENT 154
|
||||
# define CMS_F_CMS_SIGN_RECEIPT 163
|
||||
# define CMS_F_CMS_SI_CHECK_ATTRIBUTES 183
|
||||
# define CMS_F_CMS_STREAM 155
|
||||
# define CMS_F_CMS_UNCOMPRESS 156
|
||||
# define CMS_F_CMS_VERIFY 157
|
||||
# define CMS_F_KEK_UNWRAP_KEY 180
|
||||
#ifndef OPENSSL_NO_CMS
|
||||
|
||||
/*
|
||||
* CMS reason codes.
|
||||
*/
|
||||
# define CMS_R_ADD_SIGNER_ERROR 99
|
||||
# define CMS_R_ATTRIBUTE_ERROR 161
|
||||
# define CMS_R_CERTIFICATE_ALREADY_PRESENT 175
|
||||
# define CMS_R_CERTIFICATE_HAS_NO_KEYID 160
|
||||
# define CMS_R_CERTIFICATE_VERIFY_ERROR 100
|
||||
# define CMS_R_CIPHER_INITIALISATION_ERROR 101
|
||||
# define CMS_R_CIPHER_PARAMETER_INITIALISATION_ERROR 102
|
||||
# define CMS_R_CMS_DATAFINAL_ERROR 103
|
||||
# define CMS_R_CMS_LIB 104
|
||||
# define CMS_R_CONTENTIDENTIFIER_MISMATCH 170
|
||||
# define CMS_R_CONTENT_NOT_FOUND 105
|
||||
# define CMS_R_CONTENT_TYPE_MISMATCH 171
|
||||
# define CMS_R_CONTENT_TYPE_NOT_COMPRESSED_DATA 106
|
||||
# define CMS_R_CONTENT_TYPE_NOT_ENVELOPED_DATA 107
|
||||
# define CMS_R_CONTENT_TYPE_NOT_SIGNED_DATA 108
|
||||
# define CMS_R_CONTENT_VERIFY_ERROR 109
|
||||
# define CMS_R_CTRL_ERROR 110
|
||||
# define CMS_R_CTRL_FAILURE 111
|
||||
# define CMS_R_DECRYPT_ERROR 112
|
||||
# define CMS_R_ERROR_GETTING_PUBLIC_KEY 113
|
||||
# define CMS_R_ERROR_READING_MESSAGEDIGEST_ATTRIBUTE 114
|
||||
# define CMS_R_ERROR_SETTING_KEY 115
|
||||
# define CMS_R_ERROR_SETTING_RECIPIENTINFO 116
|
||||
# define CMS_R_INVALID_ENCRYPTED_KEY_LENGTH 117
|
||||
# define CMS_R_INVALID_KEY_ENCRYPTION_PARAMETER 176
|
||||
# define CMS_R_INVALID_KEY_LENGTH 118
|
||||
# define CMS_R_MD_BIO_INIT_ERROR 119
|
||||
# define CMS_R_MESSAGEDIGEST_ATTRIBUTE_WRONG_LENGTH 120
|
||||
# define CMS_R_MESSAGEDIGEST_WRONG_LENGTH 121
|
||||
# define CMS_R_MSGSIGDIGEST_ERROR 172
|
||||
# define CMS_R_MSGSIGDIGEST_VERIFICATION_FAILURE 162
|
||||
# define CMS_R_MSGSIGDIGEST_WRONG_LENGTH 163
|
||||
# define CMS_R_NEED_ONE_SIGNER 164
|
||||
# define CMS_R_NOT_A_SIGNED_RECEIPT 165
|
||||
# define CMS_R_NOT_ENCRYPTED_DATA 122
|
||||
# define CMS_R_NOT_KEK 123
|
||||
# define CMS_R_NOT_KEY_AGREEMENT 181
|
||||
# define CMS_R_NOT_KEY_TRANSPORT 124
|
||||
# define CMS_R_NOT_PWRI 177
|
||||
# define CMS_R_NOT_SUPPORTED_FOR_THIS_KEY_TYPE 125
|
||||
# define CMS_R_NO_CIPHER 126
|
||||
# define CMS_R_NO_CONTENT 127
|
||||
# define CMS_R_NO_CONTENT_TYPE 173
|
||||
# define CMS_R_NO_DEFAULT_DIGEST 128
|
||||
# define CMS_R_NO_DIGEST_SET 129
|
||||
# define CMS_R_NO_KEY 130
|
||||
# define CMS_R_NO_KEY_OR_CERT 174
|
||||
# define CMS_R_NO_MATCHING_DIGEST 131
|
||||
# define CMS_R_NO_MATCHING_RECIPIENT 132
|
||||
# define CMS_R_NO_MATCHING_SIGNATURE 166
|
||||
# define CMS_R_NO_MSGSIGDIGEST 167
|
||||
# define CMS_R_NO_PASSWORD 178
|
||||
# define CMS_R_NO_PRIVATE_KEY 133
|
||||
# define CMS_R_NO_PUBLIC_KEY 134
|
||||
# define CMS_R_NO_RECEIPT_REQUEST 168
|
||||
# define CMS_R_NO_SIGNERS 135
|
||||
# define CMS_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE 136
|
||||
# define CMS_R_RECEIPT_DECODE_ERROR 169
|
||||
# define CMS_R_RECIPIENT_ERROR 137
|
||||
# define CMS_R_SIGNER_CERTIFICATE_NOT_FOUND 138
|
||||
# define CMS_R_SIGNFINAL_ERROR 139
|
||||
# define CMS_R_SMIME_TEXT_ERROR 140
|
||||
# define CMS_R_STORE_INIT_ERROR 141
|
||||
# define CMS_R_TYPE_NOT_COMPRESSED_DATA 142
|
||||
# define CMS_R_TYPE_NOT_DATA 143
|
||||
# define CMS_R_TYPE_NOT_DIGESTED_DATA 144
|
||||
# define CMS_R_TYPE_NOT_ENCRYPTED_DATA 145
|
||||
# define CMS_R_TYPE_NOT_ENVELOPED_DATA 146
|
||||
# define CMS_R_UNABLE_TO_FINALIZE_CONTEXT 147
|
||||
# define CMS_R_UNKNOWN_CIPHER 148
|
||||
# define CMS_R_UNKNOWN_DIGEST_ALGORITHM 149
|
||||
# define CMS_R_UNKNOWN_ID 150
|
||||
# define CMS_R_UNSUPPORTED_COMPRESSION_ALGORITHM 151
|
||||
# define CMS_R_UNSUPPORTED_CONTENT_TYPE 152
|
||||
# define CMS_R_UNSUPPORTED_KEK_ALGORITHM 153
|
||||
# define CMS_R_UNSUPPORTED_KEY_ENCRYPTION_ALGORITHM 179
|
||||
# define CMS_R_UNSUPPORTED_RECIPIENTINFO_TYPE 155
|
||||
# define CMS_R_UNSUPPORTED_RECIPIENT_TYPE 154
|
||||
# define CMS_R_UNSUPPORTED_TYPE 156
|
||||
# define CMS_R_UNWRAP_ERROR 157
|
||||
# define CMS_R_UNWRAP_FAILURE 180
|
||||
# define CMS_R_VERIFICATION_FAILURE 158
|
||||
# define CMS_R_WRAP_ERROR 159
|
||||
#define CMS_R_ADD_SIGNER_ERROR 99
|
||||
#define CMS_R_ATTRIBUTE_ERROR 161
|
||||
#define CMS_R_CERTIFICATE_ALREADY_PRESENT 175
|
||||
#define CMS_R_CERTIFICATE_HAS_NO_KEYID 160
|
||||
#define CMS_R_CERTIFICATE_VERIFY_ERROR 100
|
||||
#define CMS_R_CIPHER_AEAD_IN_ENVELOPED_DATA 200
|
||||
#define CMS_R_CIPHER_AEAD_SET_TAG_ERROR 184
|
||||
#define CMS_R_CIPHER_GET_TAG 185
|
||||
#define CMS_R_CIPHER_INITIALISATION_ERROR 101
|
||||
#define CMS_R_CIPHER_PARAMETER_INITIALISATION_ERROR 102
|
||||
#define CMS_R_CMS_DATAFINAL_ERROR 103
|
||||
#define CMS_R_CMS_LIB 104
|
||||
#define CMS_R_CONTENTIDENTIFIER_MISMATCH 170
|
||||
#define CMS_R_CONTENT_NOT_FOUND 105
|
||||
#define CMS_R_CONTENT_TYPE_MISMATCH 171
|
||||
#define CMS_R_CONTENT_TYPE_NOT_COMPRESSED_DATA 106
|
||||
#define CMS_R_CONTENT_TYPE_NOT_ENVELOPED_DATA 107
|
||||
#define CMS_R_CONTENT_TYPE_NOT_SIGNED_DATA 108
|
||||
#define CMS_R_CONTENT_VERIFY_ERROR 109
|
||||
#define CMS_R_CTRL_ERROR 110
|
||||
#define CMS_R_CTRL_FAILURE 111
|
||||
#define CMS_R_DECODE_ERROR 187
|
||||
#define CMS_R_DECRYPT_ERROR 112
|
||||
#define CMS_R_ERROR_GETTING_PUBLIC_KEY 113
|
||||
#define CMS_R_ERROR_READING_MESSAGEDIGEST_ATTRIBUTE 114
|
||||
#define CMS_R_ERROR_SETTING_KEY 115
|
||||
#define CMS_R_ERROR_SETTING_RECIPIENTINFO 116
|
||||
#define CMS_R_ERROR_UNSUPPORTED_STATIC_KEY_AGREEMENT 196
|
||||
#define CMS_R_ESS_SIGNING_CERTID_MISMATCH_ERROR 183
|
||||
#define CMS_R_INVALID_ENCRYPTED_KEY_LENGTH 117
|
||||
#define CMS_R_INVALID_KEY_ENCRYPTION_PARAMETER 176
|
||||
#define CMS_R_INVALID_KEY_LENGTH 118
|
||||
#define CMS_R_INVALID_LABEL 190
|
||||
#define CMS_R_INVALID_OAEP_PARAMETERS 191
|
||||
#define CMS_R_KDF_PARAMETER_ERROR 186
|
||||
#define CMS_R_MD_BIO_INIT_ERROR 119
|
||||
#define CMS_R_MESSAGEDIGEST_ATTRIBUTE_WRONG_LENGTH 120
|
||||
#define CMS_R_MESSAGEDIGEST_WRONG_LENGTH 121
|
||||
#define CMS_R_MSGSIGDIGEST_ERROR 172
|
||||
#define CMS_R_MSGSIGDIGEST_VERIFICATION_FAILURE 162
|
||||
#define CMS_R_MSGSIGDIGEST_WRONG_LENGTH 163
|
||||
#define CMS_R_NEED_ONE_SIGNER 164
|
||||
#define CMS_R_NOT_A_SIGNED_RECEIPT 165
|
||||
#define CMS_R_NOT_ENCRYPTED_DATA 122
|
||||
#define CMS_R_NOT_KEK 123
|
||||
#define CMS_R_NOT_KEM 197
|
||||
#define CMS_R_NOT_KEY_AGREEMENT 181
|
||||
#define CMS_R_NOT_KEY_TRANSPORT 124
|
||||
#define CMS_R_NOT_PWRI 177
|
||||
#define CMS_R_NOT_SUPPORTED_FOR_THIS_KEY_TYPE 125
|
||||
#define CMS_R_NO_CIPHER 126
|
||||
#define CMS_R_NO_CONTENT 127
|
||||
#define CMS_R_NO_CONTENT_TYPE 173
|
||||
#define CMS_R_NO_DEFAULT_DIGEST 128
|
||||
#define CMS_R_NO_DIGEST_SET 129
|
||||
#define CMS_R_NO_KEY 130
|
||||
#define CMS_R_NO_KEY_OR_CERT 174
|
||||
#define CMS_R_NO_MATCHING_DIGEST 131
|
||||
#define CMS_R_NO_MATCHING_RECIPIENT 132
|
||||
#define CMS_R_NO_MATCHING_SIGNATURE 166
|
||||
#define CMS_R_NO_MSGSIGDIGEST 167
|
||||
#define CMS_R_NO_PASSWORD 178
|
||||
#define CMS_R_NO_PRIVATE_KEY 133
|
||||
#define CMS_R_NO_PUBLIC_KEY 134
|
||||
#define CMS_R_NO_RECEIPT_REQUEST 168
|
||||
#define CMS_R_NO_SIGNERS 135
|
||||
#define CMS_R_OPERATION_UNSUPPORTED 182
|
||||
#define CMS_R_PEER_KEY_ERROR 188
|
||||
#define CMS_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE 136
|
||||
#define CMS_R_RECEIPT_DECODE_ERROR 169
|
||||
#define CMS_R_RECIPIENT_ERROR 137
|
||||
#define CMS_R_SHARED_INFO_ERROR 189
|
||||
#define CMS_R_SIGNER_CERTIFICATE_NOT_FOUND 138
|
||||
#define CMS_R_SIGNFINAL_ERROR 139
|
||||
#define CMS_R_SMIME_TEXT_ERROR 140
|
||||
#define CMS_R_STORE_INIT_ERROR 141
|
||||
#define CMS_R_TYPE_NOT_COMPRESSED_DATA 142
|
||||
#define CMS_R_TYPE_NOT_DATA 143
|
||||
#define CMS_R_TYPE_NOT_DIGESTED_DATA 144
|
||||
#define CMS_R_TYPE_NOT_ENCRYPTED_DATA 145
|
||||
#define CMS_R_TYPE_NOT_ENVELOPED_DATA 146
|
||||
#define CMS_R_UNABLE_TO_FINALIZE_CONTEXT 147
|
||||
#define CMS_R_UNKNOWN_CIPHER 148
|
||||
#define CMS_R_UNKNOWN_DIGEST_ALGORITHM 149
|
||||
#define CMS_R_UNKNOWN_ID 150
|
||||
#define CMS_R_UNKNOWN_KDF_ALGORITHM 198
|
||||
#define CMS_R_UNSUPPORTED_COMPRESSION_ALGORITHM 151
|
||||
#define CMS_R_UNSUPPORTED_CONTENT_ENCRYPTION_ALGORITHM 194
|
||||
#define CMS_R_UNSUPPORTED_CONTENT_TYPE 152
|
||||
#define CMS_R_UNSUPPORTED_ENCRYPTION_TYPE 192
|
||||
#define CMS_R_UNSUPPORTED_KDF_ALGORITHM 199
|
||||
#define CMS_R_UNSUPPORTED_KEK_ALGORITHM 153
|
||||
#define CMS_R_UNSUPPORTED_KEY_ENCRYPTION_ALGORITHM 179
|
||||
#define CMS_R_UNSUPPORTED_LABEL_SOURCE 193
|
||||
#define CMS_R_UNSUPPORTED_RECIPIENTINFO_TYPE 155
|
||||
#define CMS_R_UNSUPPORTED_RECIPIENT_TYPE 154
|
||||
#define CMS_R_UNSUPPORTED_SIGNATURE_ALGORITHM 195
|
||||
#define CMS_R_UNSUPPORTED_TYPE 156
|
||||
#define CMS_R_UNWRAP_ERROR 157
|
||||
#define CMS_R_UNWRAP_FAILURE 180
|
||||
#define CMS_R_VERIFICATION_FAILURE 158
|
||||
#define CMS_R_WRAP_ERROR 159
|
||||
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1,53 +1,101 @@
|
||||
/*
|
||||
* Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 2015-2024 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (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
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#ifndef HEADER_COMP_H
|
||||
# define HEADER_COMP_H
|
||||
/* clang-format off */
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
/* clang-format on */
|
||||
|
||||
# ifndef OPENSSL_NO_COMP
|
||||
# include <openssl/crypto.h>
|
||||
# include <openssl/comperr.h>
|
||||
# ifdef __cplusplus
|
||||
#ifndef OPENSSL_COMP_H
|
||||
#define OPENSSL_COMP_H
|
||||
#pragma once
|
||||
|
||||
#include <openssl/macros.h>
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#define HEADER_COMP_H
|
||||
#endif
|
||||
|
||||
#include <openssl/opensslconf.h>
|
||||
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/comperr.h>
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef OPENSSL_NO_COMP
|
||||
|
||||
COMP_CTX *COMP_CTX_new(COMP_METHOD *meth);
|
||||
const COMP_METHOD *COMP_CTX_get_method(const COMP_CTX *ctx);
|
||||
int COMP_CTX_get_type(const COMP_CTX* comp);
|
||||
int COMP_CTX_get_type(const COMP_CTX *comp);
|
||||
int COMP_get_type(const COMP_METHOD *meth);
|
||||
const char *COMP_get_name(const COMP_METHOD *meth);
|
||||
void COMP_CTX_free(COMP_CTX *ctx);
|
||||
|
||||
int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen,
|
||||
unsigned char *in, int ilen);
|
||||
unsigned char *in, int ilen);
|
||||
int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen,
|
||||
unsigned char *in, int ilen);
|
||||
unsigned char *in, int ilen);
|
||||
|
||||
COMP_METHOD *COMP_zlib(void);
|
||||
COMP_METHOD *COMP_zlib_oneshot(void);
|
||||
COMP_METHOD *COMP_brotli(void);
|
||||
COMP_METHOD *COMP_brotli_oneshot(void);
|
||||
COMP_METHOD *COMP_zstd(void);
|
||||
COMP_METHOD *COMP_zstd_oneshot(void);
|
||||
|
||||
#if OPENSSL_API_COMPAT < 0x10100000L
|
||||
#define COMP_zlib_cleanup() while(0) continue
|
||||
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
#define COMP_zlib_cleanup() \
|
||||
while (0) \
|
||||
continue
|
||||
#endif
|
||||
|
||||
# ifdef HEADER_BIO_H
|
||||
# ifdef ZLIB
|
||||
#ifdef OPENSSL_BIO_H
|
||||
const BIO_METHOD *BIO_f_zlib(void);
|
||||
# endif
|
||||
# endif
|
||||
const BIO_METHOD *BIO_f_brotli(void);
|
||||
const BIO_METHOD *BIO_f_zstd(void);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
# ifdef __cplusplus
|
||||
typedef struct ssl_comp_st SSL_COMP;
|
||||
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(SSL_COMP, SSL_COMP, SSL_COMP)
|
||||
#define sk_SSL_COMP_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_COMP_sk_type(sk))
|
||||
#define sk_SSL_COMP_value(sk, idx) ((SSL_COMP *)OPENSSL_sk_value(ossl_check_const_SSL_COMP_sk_type(sk), (idx)))
|
||||
#define sk_SSL_COMP_new(cmp) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new(ossl_check_SSL_COMP_compfunc_type(cmp)), sk_SSL_COMP_cmpfunc_thunk))
|
||||
#define sk_SSL_COMP_new_null() ((STACK_OF(SSL_COMP) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_SSL_COMP_freefunc_thunk))
|
||||
#define sk_SSL_COMP_new_reserve(cmp, n) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new_reserve(ossl_check_SSL_COMP_compfunc_type(cmp), (n)), sk_SSL_COMP_cmpfunc_thunk))
|
||||
#define sk_SSL_COMP_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_SSL_COMP_sk_type(sk), (n))
|
||||
#define sk_SSL_COMP_free(sk) OPENSSL_sk_free(ossl_check_SSL_COMP_sk_type(sk))
|
||||
#define sk_SSL_COMP_zero(sk) OPENSSL_sk_zero(ossl_check_SSL_COMP_sk_type(sk))
|
||||
#define sk_SSL_COMP_delete(sk, i) ((SSL_COMP *)OPENSSL_sk_delete(ossl_check_SSL_COMP_sk_type(sk), (i)))
|
||||
#define sk_SSL_COMP_delete_ptr(sk, ptr) ((SSL_COMP *)OPENSSL_sk_delete_ptr(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr)))
|
||||
#define sk_SSL_COMP_push(sk, ptr) OPENSSL_sk_push(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr))
|
||||
#define sk_SSL_COMP_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr))
|
||||
#define sk_SSL_COMP_pop(sk) ((SSL_COMP *)OPENSSL_sk_pop(ossl_check_SSL_COMP_sk_type(sk)))
|
||||
#define sk_SSL_COMP_shift(sk) ((SSL_COMP *)OPENSSL_sk_shift(ossl_check_SSL_COMP_sk_type(sk)))
|
||||
#define sk_SSL_COMP_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_freefunc_type(freefunc))
|
||||
#define sk_SSL_COMP_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr), (idx))
|
||||
#define sk_SSL_COMP_set(sk, idx, ptr) ((SSL_COMP *)OPENSSL_sk_set(ossl_check_SSL_COMP_sk_type(sk), (idx), ossl_check_SSL_COMP_type(ptr)))
|
||||
#define sk_SSL_COMP_find(sk, ptr) OPENSSL_sk_find(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr))
|
||||
#define sk_SSL_COMP_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr))
|
||||
#define sk_SSL_COMP_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr), pnum)
|
||||
#define sk_SSL_COMP_sort(sk) OPENSSL_sk_sort(ossl_check_SSL_COMP_sk_type(sk))
|
||||
#define sk_SSL_COMP_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_SSL_COMP_sk_type(sk))
|
||||
#define sk_SSL_COMP_dup(sk) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_dup(ossl_check_const_SSL_COMP_sk_type(sk)))
|
||||
#define sk_SSL_COMP_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_deep_copy(ossl_check_const_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_copyfunc_type(copyfunc), ossl_check_SSL_COMP_freefunc_type(freefunc)))
|
||||
#define sk_SSL_COMP_set_cmp_func(sk, cmp) ((sk_SSL_COMP_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_compfunc_type(cmp)))
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1,44 +1,36 @@
|
||||
/*
|
||||
* Generated by util/mkerr.pl DO NOT EDIT
|
||||
* Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (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
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#ifndef HEADER_COMPERR_H
|
||||
# define HEADER_COMPERR_H
|
||||
#ifndef OPENSSL_COMPERR_H
|
||||
#define OPENSSL_COMPERR_H
|
||||
#pragma once
|
||||
|
||||
# ifndef HEADER_SYMHACKS_H
|
||||
# include <openssl/symhacks.h>
|
||||
# endif
|
||||
#include <openssl/opensslconf.h>
|
||||
#include <openssl/symhacks.h>
|
||||
#include <openssl/cryptoerr_legacy.h>
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
|
||||
# ifndef OPENSSL_NO_COMP
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C"
|
||||
# endif
|
||||
int ERR_load_COMP_strings(void);
|
||||
|
||||
/*
|
||||
* COMP function codes.
|
||||
*/
|
||||
# define COMP_F_BIO_ZLIB_FLUSH 99
|
||||
# define COMP_F_BIO_ZLIB_NEW 100
|
||||
# define COMP_F_BIO_ZLIB_READ 101
|
||||
# define COMP_F_BIO_ZLIB_WRITE 102
|
||||
# define COMP_F_COMP_CTX_NEW 103
|
||||
#ifndef OPENSSL_NO_COMP
|
||||
|
||||
/*
|
||||
* COMP reason codes.
|
||||
*/
|
||||
# define COMP_R_ZLIB_DEFLATE_ERROR 99
|
||||
# define COMP_R_ZLIB_INFLATE_ERROR 100
|
||||
# define COMP_R_ZLIB_NOT_SUPPORTED 101
|
||||
#define COMP_R_BROTLI_DECODE_ERROR 102
|
||||
#define COMP_R_BROTLI_ENCODE_ERROR 103
|
||||
#define COMP_R_BROTLI_NOT_SUPPORTED 104
|
||||
#define COMP_R_ZLIB_DEFLATE_ERROR 99
|
||||
#define COMP_R_ZLIB_INFLATE_ERROR 100
|
||||
#define COMP_R_ZLIB_NOT_SUPPORTED 101
|
||||
#define COMP_R_ZSTD_COMPRESS_ERROR 105
|
||||
#define COMP_R_ZSTD_DECODE_ERROR 106
|
||||
#define COMP_R_ZSTD_DECOMPRESS_ERROR 107
|
||||
#define COMP_R_ZSTD_NOT_SUPPORTED 108
|
||||
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1,23 +1,39 @@
|
||||
/*
|
||||
* Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* WARNING: do not edit!
|
||||
* Generated by Makefile from include/openssl/conf.h.in
|
||||
*
|
||||
* Licensed under the OpenSSL license (the "License"). You may not use
|
||||
* Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* 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
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#ifndef HEADER_CONF_H
|
||||
# define HEADER_CONF_H
|
||||
/* clang-format off */
|
||||
|
||||
# include <openssl/bio.h>
|
||||
# include <openssl/lhash.h>
|
||||
# include <openssl/safestack.h>
|
||||
# include <openssl/e_os2.h>
|
||||
# include <openssl/ossl_typ.h>
|
||||
# include <openssl/conferr.h>
|
||||
/* clang-format on */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifndef OPENSSL_CONF_H
|
||||
#define OPENSSL_CONF_H
|
||||
#pragma once
|
||||
|
||||
#include <openssl/macros.h>
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#define HEADER_CONF_H
|
||||
#endif
|
||||
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/lhash.h>
|
||||
#include <openssl/safestack.h>
|
||||
#include <openssl/e_os2.h>
|
||||
#include <openssl/types.h>
|
||||
#include <openssl/conferr.h>
|
||||
#ifndef OPENSSL_NO_STDIO
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -27,71 +43,104 @@ typedef struct {
|
||||
char *value;
|
||||
} CONF_VALUE;
|
||||
|
||||
DEFINE_STACK_OF(CONF_VALUE)
|
||||
DEFINE_LHASH_OF(CONF_VALUE);
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(CONF_VALUE, CONF_VALUE, CONF_VALUE)
|
||||
#define sk_CONF_VALUE_num(sk) OPENSSL_sk_num(ossl_check_const_CONF_VALUE_sk_type(sk))
|
||||
#define sk_CONF_VALUE_value(sk, idx) ((CONF_VALUE *)OPENSSL_sk_value(ossl_check_const_CONF_VALUE_sk_type(sk), (idx)))
|
||||
#define sk_CONF_VALUE_new(cmp) ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new(ossl_check_CONF_VALUE_compfunc_type(cmp)), sk_CONF_VALUE_cmpfunc_thunk))
|
||||
#define sk_CONF_VALUE_new_null() ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_CONF_VALUE_freefunc_thunk))
|
||||
#define sk_CONF_VALUE_new_reserve(cmp, n) ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new_reserve(ossl_check_CONF_VALUE_compfunc_type(cmp), (n)), sk_CONF_VALUE_cmpfunc_thunk))
|
||||
#define sk_CONF_VALUE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_CONF_VALUE_sk_type(sk), (n))
|
||||
#define sk_CONF_VALUE_free(sk) OPENSSL_sk_free(ossl_check_CONF_VALUE_sk_type(sk))
|
||||
#define sk_CONF_VALUE_zero(sk) OPENSSL_sk_zero(ossl_check_CONF_VALUE_sk_type(sk))
|
||||
#define sk_CONF_VALUE_delete(sk, i) ((CONF_VALUE *)OPENSSL_sk_delete(ossl_check_CONF_VALUE_sk_type(sk), (i)))
|
||||
#define sk_CONF_VALUE_delete_ptr(sk, ptr) ((CONF_VALUE *)OPENSSL_sk_delete_ptr(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr)))
|
||||
#define sk_CONF_VALUE_push(sk, ptr) OPENSSL_sk_push(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr))
|
||||
#define sk_CONF_VALUE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr))
|
||||
#define sk_CONF_VALUE_pop(sk) ((CONF_VALUE *)OPENSSL_sk_pop(ossl_check_CONF_VALUE_sk_type(sk)))
|
||||
#define sk_CONF_VALUE_shift(sk) ((CONF_VALUE *)OPENSSL_sk_shift(ossl_check_CONF_VALUE_sk_type(sk)))
|
||||
#define sk_CONF_VALUE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_freefunc_type(freefunc))
|
||||
#define sk_CONF_VALUE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr), (idx))
|
||||
#define sk_CONF_VALUE_set(sk, idx, ptr) ((CONF_VALUE *)OPENSSL_sk_set(ossl_check_CONF_VALUE_sk_type(sk), (idx), ossl_check_CONF_VALUE_type(ptr)))
|
||||
#define sk_CONF_VALUE_find(sk, ptr) OPENSSL_sk_find(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr))
|
||||
#define sk_CONF_VALUE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr))
|
||||
#define sk_CONF_VALUE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr), pnum)
|
||||
#define sk_CONF_VALUE_sort(sk) OPENSSL_sk_sort(ossl_check_CONF_VALUE_sk_type(sk))
|
||||
#define sk_CONF_VALUE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_CONF_VALUE_sk_type(sk))
|
||||
#define sk_CONF_VALUE_dup(sk) ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_dup(ossl_check_const_CONF_VALUE_sk_type(sk)))
|
||||
#define sk_CONF_VALUE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_deep_copy(ossl_check_const_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_copyfunc_type(copyfunc), ossl_check_CONF_VALUE_freefunc_type(freefunc)))
|
||||
#define sk_CONF_VALUE_set_cmp_func(sk, cmp) ((sk_CONF_VALUE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_compfunc_type(cmp)))
|
||||
DEFINE_LHASH_OF_INTERNAL(CONF_VALUE);
|
||||
#define lh_CONF_VALUE_new(hfn, cmp) ((LHASH_OF(CONF_VALUE) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new(ossl_check_CONF_VALUE_lh_hashfunc_type(hfn), ossl_check_CONF_VALUE_lh_compfunc_type(cmp)), lh_CONF_VALUE_hash_thunk, lh_CONF_VALUE_comp_thunk, lh_CONF_VALUE_doall_thunk, lh_CONF_VALUE_doall_arg_thunk))
|
||||
#define lh_CONF_VALUE_free(lh) OPENSSL_LH_free(ossl_check_CONF_VALUE_lh_type(lh))
|
||||
#define lh_CONF_VALUE_flush(lh) OPENSSL_LH_flush(ossl_check_CONF_VALUE_lh_type(lh))
|
||||
#define lh_CONF_VALUE_insert(lh, ptr) ((CONF_VALUE *)OPENSSL_LH_insert(ossl_check_CONF_VALUE_lh_type(lh), ossl_check_CONF_VALUE_lh_plain_type(ptr)))
|
||||
#define lh_CONF_VALUE_delete(lh, ptr) ((CONF_VALUE *)OPENSSL_LH_delete(ossl_check_CONF_VALUE_lh_type(lh), ossl_check_const_CONF_VALUE_lh_plain_type(ptr)))
|
||||
#define lh_CONF_VALUE_retrieve(lh, ptr) ((CONF_VALUE *)OPENSSL_LH_retrieve(ossl_check_CONF_VALUE_lh_type(lh), ossl_check_const_CONF_VALUE_lh_plain_type(ptr)))
|
||||
#define lh_CONF_VALUE_error(lh) OPENSSL_LH_error(ossl_check_CONF_VALUE_lh_type(lh))
|
||||
#define lh_CONF_VALUE_num_items(lh) OPENSSL_LH_num_items(ossl_check_CONF_VALUE_lh_type(lh))
|
||||
#define lh_CONF_VALUE_node_stats_bio(lh, out) OPENSSL_LH_node_stats_bio(ossl_check_const_CONF_VALUE_lh_type(lh), out)
|
||||
#define lh_CONF_VALUE_node_usage_stats_bio(lh, out) OPENSSL_LH_node_usage_stats_bio(ossl_check_const_CONF_VALUE_lh_type(lh), out)
|
||||
#define lh_CONF_VALUE_stats_bio(lh, out) OPENSSL_LH_stats_bio(ossl_check_const_CONF_VALUE_lh_type(lh), out)
|
||||
#define lh_CONF_VALUE_get_down_load(lh) OPENSSL_LH_get_down_load(ossl_check_CONF_VALUE_lh_type(lh))
|
||||
#define lh_CONF_VALUE_set_down_load(lh, dl) OPENSSL_LH_set_down_load(ossl_check_CONF_VALUE_lh_type(lh), dl)
|
||||
#define lh_CONF_VALUE_doall(lh, dfn) OPENSSL_LH_doall(ossl_check_CONF_VALUE_lh_type(lh), ossl_check_CONF_VALUE_lh_doallfunc_type(dfn))
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
struct conf_st;
|
||||
struct conf_method_st;
|
||||
typedef struct conf_method_st CONF_METHOD;
|
||||
|
||||
struct conf_method_st {
|
||||
const char *name;
|
||||
CONF *(*create) (CONF_METHOD *meth);
|
||||
int (*init) (CONF *conf);
|
||||
int (*destroy) (CONF *conf);
|
||||
int (*destroy_data) (CONF *conf);
|
||||
int (*load_bio) (CONF *conf, BIO *bp, long *eline);
|
||||
int (*dump) (const CONF *conf, BIO *bp);
|
||||
int (*is_number) (const CONF *conf, char c);
|
||||
int (*to_int) (const CONF *conf, char c);
|
||||
int (*load) (CONF *conf, const char *name, long *eline);
|
||||
};
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#include <openssl/conftypes.h>
|
||||
#endif
|
||||
|
||||
/* Module definitions */
|
||||
|
||||
typedef struct conf_imodule_st CONF_IMODULE;
|
||||
typedef struct conf_module_st CONF_MODULE;
|
||||
|
||||
DEFINE_STACK_OF(CONF_MODULE)
|
||||
DEFINE_STACK_OF(CONF_IMODULE)
|
||||
STACK_OF(CONF_MODULE);
|
||||
STACK_OF(CONF_IMODULE);
|
||||
|
||||
/* DSO module function typedefs */
|
||||
typedef int conf_init_func (CONF_IMODULE *md, const CONF *cnf);
|
||||
typedef void conf_finish_func (CONF_IMODULE *md);
|
||||
typedef int conf_init_func(CONF_IMODULE *md, const CONF *cnf);
|
||||
typedef void conf_finish_func(CONF_IMODULE *md);
|
||||
|
||||
# define CONF_MFLAGS_IGNORE_ERRORS 0x1
|
||||
# define CONF_MFLAGS_IGNORE_RETURN_CODES 0x2
|
||||
# define CONF_MFLAGS_SILENT 0x4
|
||||
# define CONF_MFLAGS_NO_DSO 0x8
|
||||
# define CONF_MFLAGS_IGNORE_MISSING_FILE 0x10
|
||||
# define CONF_MFLAGS_DEFAULT_SECTION 0x20
|
||||
#define CONF_MFLAGS_IGNORE_ERRORS 0x1
|
||||
#define CONF_MFLAGS_IGNORE_RETURN_CODES 0x2
|
||||
#define CONF_MFLAGS_SILENT 0x4
|
||||
#define CONF_MFLAGS_NO_DSO 0x8
|
||||
#define CONF_MFLAGS_IGNORE_MISSING_FILE 0x10
|
||||
#define CONF_MFLAGS_DEFAULT_SECTION 0x20
|
||||
|
||||
int CONF_set_default_method(CONF_METHOD *meth);
|
||||
void CONF_set_nconf(CONF *conf, LHASH_OF(CONF_VALUE) *hash);
|
||||
LHASH_OF(CONF_VALUE) *CONF_load(LHASH_OF(CONF_VALUE) *conf, const char *file,
|
||||
long *eline);
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
long *eline);
|
||||
#ifndef OPENSSL_NO_STDIO
|
||||
LHASH_OF(CONF_VALUE) *CONF_load_fp(LHASH_OF(CONF_VALUE) *conf, FILE *fp,
|
||||
long *eline);
|
||||
# endif
|
||||
long *eline);
|
||||
#endif
|
||||
LHASH_OF(CONF_VALUE) *CONF_load_bio(LHASH_OF(CONF_VALUE) *conf, BIO *bp,
|
||||
long *eline);
|
||||
long *eline);
|
||||
STACK_OF(CONF_VALUE) *CONF_get_section(LHASH_OF(CONF_VALUE) *conf,
|
||||
const char *section);
|
||||
const char *section);
|
||||
char *CONF_get_string(LHASH_OF(CONF_VALUE) *conf, const char *group,
|
||||
const char *name);
|
||||
const char *name);
|
||||
long CONF_get_number(LHASH_OF(CONF_VALUE) *conf, const char *group,
|
||||
const char *name);
|
||||
const char *name);
|
||||
void CONF_free(LHASH_OF(CONF_VALUE) *conf);
|
||||
#ifndef OPENSSL_NO_STDIO
|
||||
int CONF_dump_fp(LHASH_OF(CONF_VALUE) *conf, FILE *out);
|
||||
#endif
|
||||
int CONF_dump_bio(LHASH_OF(CONF_VALUE) *conf, BIO *out);
|
||||
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
OSSL_DEPRECATEDIN_1_1_0 void OPENSSL_config(const char *config_name);
|
||||
#endif
|
||||
|
||||
DEPRECATEDIN_1_1_0(void OPENSSL_config(const char *config_name))
|
||||
|
||||
#if OPENSSL_API_COMPAT < 0x10100000L
|
||||
# define OPENSSL_no_config() \
|
||||
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
#define OPENSSL_no_config() \
|
||||
OPENSSL_init_crypto(OPENSSL_INIT_NO_LOAD_CONFIG, NULL)
|
||||
#endif
|
||||
|
||||
@@ -100,48 +149,51 @@ DEPRECATEDIN_1_1_0(void OPENSSL_config(const char *config_name))
|
||||
* that wasn't the case, the above functions would have been replaced
|
||||
*/
|
||||
|
||||
struct conf_st {
|
||||
CONF_METHOD *meth;
|
||||
void *meth_data;
|
||||
LHASH_OF(CONF_VALUE) *data;
|
||||
};
|
||||
|
||||
CONF *NCONF_new_ex(OSSL_LIB_CTX *libctx, CONF_METHOD *meth);
|
||||
OSSL_LIB_CTX *NCONF_get0_libctx(const CONF *conf);
|
||||
CONF *NCONF_new(CONF_METHOD *meth);
|
||||
CONF_METHOD *NCONF_default(void);
|
||||
CONF_METHOD *NCONF_WIN32(void);
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
OSSL_DEPRECATEDIN_3_0 CONF_METHOD *NCONF_WIN32(void);
|
||||
#endif
|
||||
void NCONF_free(CONF *conf);
|
||||
void NCONF_free_data(CONF *conf);
|
||||
|
||||
int NCONF_load(CONF *conf, const char *file, long *eline);
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
#ifndef OPENSSL_NO_STDIO
|
||||
int NCONF_load_fp(CONF *conf, FILE *fp, long *eline);
|
||||
# endif
|
||||
#endif
|
||||
int NCONF_load_bio(CONF *conf, BIO *bp, long *eline);
|
||||
STACK_OF(OPENSSL_CSTRING) *NCONF_get_section_names(const CONF *conf);
|
||||
STACK_OF(CONF_VALUE) *NCONF_get_section(const CONF *conf,
|
||||
const char *section);
|
||||
const char *section);
|
||||
char *NCONF_get_string(const CONF *conf, const char *group, const char *name);
|
||||
int NCONF_get_number_e(const CONF *conf, const char *group, const char *name,
|
||||
long *result);
|
||||
long *result);
|
||||
#ifndef OPENSSL_NO_STDIO
|
||||
int NCONF_dump_fp(const CONF *conf, FILE *out);
|
||||
#endif
|
||||
int NCONF_dump_bio(const CONF *conf, BIO *out);
|
||||
|
||||
#define NCONF_get_number(c,g,n,r) NCONF_get_number_e(c,g,n,r)
|
||||
#define NCONF_get_number(c, g, n, r) NCONF_get_number_e(c, g, n, r)
|
||||
|
||||
/* Module functions */
|
||||
|
||||
int CONF_modules_load(const CONF *cnf, const char *appname,
|
||||
unsigned long flags);
|
||||
unsigned long flags);
|
||||
int CONF_modules_load_file_ex(OSSL_LIB_CTX *libctx, const char *filename,
|
||||
const char *appname, unsigned long flags);
|
||||
int CONF_modules_load_file(const char *filename, const char *appname,
|
||||
unsigned long flags);
|
||||
unsigned long flags);
|
||||
void CONF_modules_unload(int all);
|
||||
void CONF_modules_finish(void);
|
||||
#if OPENSSL_API_COMPAT < 0x10100000L
|
||||
# define CONF_modules_free() while(0) continue
|
||||
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
#define CONF_modules_free() \
|
||||
while (0) \
|
||||
continue
|
||||
#endif
|
||||
int CONF_module_add(const char *name, conf_init_func *ifunc,
|
||||
conf_finish_func *ffunc);
|
||||
conf_finish_func *ffunc);
|
||||
|
||||
const char *CONF_imodule_get_name(const CONF_IMODULE *md);
|
||||
const char *CONF_imodule_get_value(const CONF_IMODULE *md);
|
||||
@@ -156,13 +208,12 @@ void CONF_module_set_usr_data(CONF_MODULE *pmod, void *usr_data);
|
||||
char *CONF_get1_default_config_file(void);
|
||||
|
||||
int CONF_parse_list(const char *list, int sep, int nospc,
|
||||
int (*list_cb) (const char *elem, int len, void *usr),
|
||||
void *arg);
|
||||
int (*list_cb)(const char *elem, int len, void *usr),
|
||||
void *arg);
|
||||
|
||||
void OPENSSL_load_builtin_modules(void);
|
||||
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1,19 +1,25 @@
|
||||
/*
|
||||
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (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
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#ifndef HEADER_CONF_API_H
|
||||
# define HEADER_CONF_API_H
|
||||
#ifndef OPENSSL_CONF_API_H
|
||||
#define OPENSSL_CONF_API_H
|
||||
#pragma once
|
||||
|
||||
# include <openssl/lhash.h>
|
||||
# include <openssl/conf.h>
|
||||
#include <openssl/macros.h>
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#define HEADER_CONF_API_H
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include <openssl/lhash.h>
|
||||
#include <openssl/conf.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -23,18 +29,18 @@ CONF_VALUE *_CONF_new_section(CONF *conf, const char *section);
|
||||
CONF_VALUE *_CONF_get_section(const CONF *conf, const char *section);
|
||||
/* Up until OpenSSL 0.9.5a, this was CONF_get_section */
|
||||
STACK_OF(CONF_VALUE) *_CONF_get_section_values(const CONF *conf,
|
||||
const char *section);
|
||||
const char *section);
|
||||
|
||||
int _CONF_add_string(CONF *conf, CONF_VALUE *section, CONF_VALUE *value);
|
||||
char *_CONF_get_string(const CONF *conf, const char *section,
|
||||
const char *name);
|
||||
const char *name);
|
||||
long _CONF_get_number(const CONF *conf, const char *section,
|
||||
const char *name);
|
||||
const char *name);
|
||||
|
||||
int _CONF_new_data(CONF *conf);
|
||||
void _CONF_free_data(CONF *conf);
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1,76 +1,50 @@
|
||||
/*
|
||||
* Generated by util/mkerr.pl DO NOT EDIT
|
||||
* Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (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
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#ifndef HEADER_CONFERR_H
|
||||
# define HEADER_CONFERR_H
|
||||
#ifndef OPENSSL_CONFERR_H
|
||||
#define OPENSSL_CONFERR_H
|
||||
#pragma once
|
||||
|
||||
# ifndef HEADER_SYMHACKS_H
|
||||
# include <openssl/symhacks.h>
|
||||
# endif
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C"
|
||||
# endif
|
||||
int ERR_load_CONF_strings(void);
|
||||
|
||||
/*
|
||||
* CONF function codes.
|
||||
*/
|
||||
# define CONF_F_CONF_DUMP_FP 104
|
||||
# define CONF_F_CONF_LOAD 100
|
||||
# define CONF_F_CONF_LOAD_FP 103
|
||||
# define CONF_F_CONF_PARSE_LIST 119
|
||||
# define CONF_F_DEF_LOAD 120
|
||||
# define CONF_F_DEF_LOAD_BIO 121
|
||||
# define CONF_F_GET_NEXT_FILE 107
|
||||
# define CONF_F_MODULE_ADD 122
|
||||
# define CONF_F_MODULE_INIT 115
|
||||
# define CONF_F_MODULE_LOAD_DSO 117
|
||||
# define CONF_F_MODULE_RUN 118
|
||||
# define CONF_F_NCONF_DUMP_BIO 105
|
||||
# define CONF_F_NCONF_DUMP_FP 106
|
||||
# define CONF_F_NCONF_GET_NUMBER_E 112
|
||||
# define CONF_F_NCONF_GET_SECTION 108
|
||||
# define CONF_F_NCONF_GET_STRING 109
|
||||
# define CONF_F_NCONF_LOAD 113
|
||||
# define CONF_F_NCONF_LOAD_BIO 110
|
||||
# define CONF_F_NCONF_LOAD_FP 114
|
||||
# define CONF_F_NCONF_NEW 111
|
||||
# define CONF_F_PROCESS_INCLUDE 116
|
||||
# define CONF_F_SSL_MODULE_INIT 123
|
||||
# define CONF_F_STR_COPY 101
|
||||
#include <openssl/opensslconf.h>
|
||||
#include <openssl/symhacks.h>
|
||||
#include <openssl/cryptoerr_legacy.h>
|
||||
|
||||
/*
|
||||
* CONF reason codes.
|
||||
*/
|
||||
# define CONF_R_ERROR_LOADING_DSO 110
|
||||
# define CONF_R_LIST_CANNOT_BE_NULL 115
|
||||
# define CONF_R_MISSING_CLOSE_SQUARE_BRACKET 100
|
||||
# define CONF_R_MISSING_EQUAL_SIGN 101
|
||||
# define CONF_R_MISSING_INIT_FUNCTION 112
|
||||
# define CONF_R_MODULE_INITIALIZATION_ERROR 109
|
||||
# define CONF_R_NO_CLOSE_BRACE 102
|
||||
# define CONF_R_NO_CONF 105
|
||||
# define CONF_R_NO_CONF_OR_ENVIRONMENT_VARIABLE 106
|
||||
# define CONF_R_NO_SECTION 107
|
||||
# define CONF_R_NO_SUCH_FILE 114
|
||||
# define CONF_R_NO_VALUE 108
|
||||
# define CONF_R_NUMBER_TOO_LARGE 121
|
||||
# define CONF_R_RECURSIVE_DIRECTORY_INCLUDE 111
|
||||
# define CONF_R_SSL_COMMAND_SECTION_EMPTY 117
|
||||
# define CONF_R_SSL_COMMAND_SECTION_NOT_FOUND 118
|
||||
# define CONF_R_SSL_SECTION_EMPTY 119
|
||||
# define CONF_R_SSL_SECTION_NOT_FOUND 120
|
||||
# define CONF_R_UNABLE_TO_CREATE_NEW_SECTION 103
|
||||
# define CONF_R_UNKNOWN_MODULE_NAME 113
|
||||
# define CONF_R_VARIABLE_EXPANSION_TOO_LONG 116
|
||||
# define CONF_R_VARIABLE_HAS_NO_VALUE 104
|
||||
#define CONF_R_ERROR_LOADING_DSO 110
|
||||
#define CONF_R_INVALID_PRAGMA 122
|
||||
#define CONF_R_LIST_CANNOT_BE_NULL 115
|
||||
#define CONF_R_MANDATORY_BRACES_IN_VARIABLE_EXPANSION 123
|
||||
#define CONF_R_MISSING_CLOSE_SQUARE_BRACKET 100
|
||||
#define CONF_R_MISSING_EQUAL_SIGN 101
|
||||
#define CONF_R_MISSING_INIT_FUNCTION 112
|
||||
#define CONF_R_MODULE_INITIALIZATION_ERROR 109
|
||||
#define CONF_R_NO_CLOSE_BRACE 102
|
||||
#define CONF_R_NO_CONF 105
|
||||
#define CONF_R_NO_CONF_OR_ENVIRONMENT_VARIABLE 106
|
||||
#define CONF_R_NO_SECTION 107
|
||||
#define CONF_R_NO_SUCH_FILE 114
|
||||
#define CONF_R_NO_VALUE 108
|
||||
#define CONF_R_NUMBER_TOO_LARGE 121
|
||||
#define CONF_R_OPENSSL_CONF_REFERENCES_MISSING_SECTION 124
|
||||
#define CONF_R_RECURSIVE_DIRECTORY_INCLUDE 111
|
||||
#define CONF_R_RECURSIVE_SECTION_REFERENCE 126
|
||||
#define CONF_R_RELATIVE_PATH 125
|
||||
#define CONF_R_SSL_COMMAND_SECTION_EMPTY 117
|
||||
#define CONF_R_SSL_COMMAND_SECTION_NOT_FOUND 118
|
||||
#define CONF_R_SSL_SECTION_EMPTY 119
|
||||
#define CONF_R_SSL_SECTION_NOT_FOUND 120
|
||||
#define CONF_R_UNABLE_TO_CREATE_NEW_SECTION 103
|
||||
#define CONF_R_UNKNOWN_MODULE_NAME 113
|
||||
#define CONF_R_VARIABLE_EXPANSION_TOO_LONG 116
|
||||
#define CONF_R_VARIABLE_HAS_NO_VALUE 104
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
* WARNING: do not edit!
|
||||
* Generated by Makefile from include/openssl/configuration.h.in
|
||||
* Generated by configdata.pm from Configurations/common0.tmpl, Configurations/unix-Makefile.tmpl
|
||||
* via Makefile.in
|
||||
*
|
||||
* Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
@@ -11,22 +12,23 @@
|
||||
*/
|
||||
|
||||
#ifndef OPENSSL_CONFIGURATION_H
|
||||
# define OPENSSL_CONFIGURATION_H
|
||||
# pragma once
|
||||
#define OPENSSL_CONFIGURATION_H
|
||||
#pragma once
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# ifdef OPENSSL_ALGORITHM_DEFINES
|
||||
# error OPENSSL_ALGORITHM_DEFINES no longer supported
|
||||
# endif
|
||||
#ifdef OPENSSL_ALGORITHM_DEFINES
|
||||
#error OPENSSL_ALGORITHM_DEFINES no longer supported
|
||||
#endif
|
||||
|
||||
/*
|
||||
* OpenSSL was configured with the following options:
|
||||
*/
|
||||
|
||||
# define OPENSSL_CONFIGURED_API 30000
|
||||
/* clang-format off */
|
||||
# define OPENSSL_CONFIGURED_API 40000
|
||||
# ifndef OPENSSL_RAND_SEED_OS
|
||||
# define OPENSSL_RAND_SEED_OS
|
||||
# endif
|
||||
@@ -36,26 +38,35 @@ extern "C" {
|
||||
# ifndef OPENSSL_NO_ACVP_TESTS
|
||||
# define OPENSSL_NO_ACVP_TESTS
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_AFALGENG
|
||||
# define OPENSSL_NO_AFALGENG
|
||||
# ifndef OPENSSL_NO_ALLOCFAIL_TESTS
|
||||
# define OPENSSL_NO_ALLOCFAIL_TESTS
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_APPS
|
||||
# define OPENSSL_NO_APPS
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_ASAN
|
||||
# define OPENSSL_NO_ASAN
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_CAPIENG
|
||||
# define OPENSSL_NO_CAPIENG
|
||||
# ifndef OPENSSL_NO_BROTLI
|
||||
# define OPENSSL_NO_BROTLI
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_BROTLI_DYNAMIC
|
||||
# define OPENSSL_NO_BROTLI_DYNAMIC
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_CRYPTO_MDEBUG
|
||||
# define OPENSSL_NO_CRYPTO_MDEBUG
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
|
||||
# define OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
|
||||
# ifndef OPENSSL_NO_DEMOS
|
||||
# define OPENSSL_NO_DEMOS
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_DEPRECATED
|
||||
# define OPENSSL_NO_DEPRECATED
|
||||
# ifndef OPENSSL_NO_DSO
|
||||
# define OPENSSL_NO_DSO
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_DEVCRYPTOENG
|
||||
# define OPENSSL_NO_DEVCRYPTOENG
|
||||
# ifndef OPENSSL_NO_DYNAMIC_ENGINE
|
||||
# define OPENSSL_NO_DYNAMIC_ENGINE
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_EC_EXPLICIT_CURVES
|
||||
# define OPENSSL_NO_EC_EXPLICIT_CURVES
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
|
||||
# define OPENSSL_NO_EC_NISTP_64_GCC_128
|
||||
@@ -69,6 +80,12 @@ extern "C" {
|
||||
# ifndef OPENSSL_NO_EXTERNAL_TESTS
|
||||
# define OPENSSL_NO_EXTERNAL_TESTS
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_FIPS_JITTER
|
||||
# define OPENSSL_NO_FIPS_JITTER
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_FIPS_POST
|
||||
# define OPENSSL_NO_FIPS_POST
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_FIPS_SECURITYCHECKS
|
||||
# define OPENSSL_NO_FIPS_SECURITYCHECKS
|
||||
# endif
|
||||
@@ -78,11 +95,20 @@ extern "C" {
|
||||
# ifndef OPENSSL_NO_FUZZ_LIBFUZZER
|
||||
# define OPENSSL_NO_FUZZ_LIBFUZZER
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_H3DEMO
|
||||
# define OPENSSL_NO_H3DEMO
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_HQINTEROP
|
||||
# define OPENSSL_NO_HQINTEROP
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_JITTER
|
||||
# define OPENSSL_NO_JITTER
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_KTLS
|
||||
# define OPENSSL_NO_KTLS
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_LOADERENG
|
||||
# define OPENSSL_NO_LOADERENG
|
||||
# ifndef OPENSSL_NO_LMS
|
||||
# define OPENSSL_NO_LMS
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_MD2
|
||||
# define OPENSSL_NO_MD2
|
||||
@@ -90,8 +116,8 @@ extern "C" {
|
||||
# ifndef OPENSSL_NO_MSAN
|
||||
# define OPENSSL_NO_MSAN
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_PADLOCKENG
|
||||
# define OPENSSL_NO_PADLOCKENG
|
||||
# ifndef OPENSSL_NO_PIE
|
||||
# define OPENSSL_NO_PIE
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_RC5
|
||||
# define OPENSSL_NO_RC5
|
||||
@@ -99,18 +125,24 @@ extern "C" {
|
||||
# ifndef OPENSSL_NO_SCTP
|
||||
# define OPENSSL_NO_SCTP
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_SRP
|
||||
# define OPENSSL_NO_SRP
|
||||
# ifndef OPENSSL_NO_SSLKEYLOG
|
||||
# define OPENSSL_NO_SSLKEYLOG
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_SSL3
|
||||
# define OPENSSL_NO_SSL3
|
||||
# ifndef OPENSSL_NO_STATIC_ENGINE
|
||||
# define OPENSSL_NO_STATIC_ENGINE
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_SSL3_METHOD
|
||||
# define OPENSSL_NO_SSL3_METHOD
|
||||
# ifndef OPENSSL_NO_STATIC_VCRUNTIME
|
||||
# define OPENSSL_NO_STATIC_VCRUNTIME
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_TESTS
|
||||
# define OPENSSL_NO_TESTS
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_TFO
|
||||
# define OPENSSL_NO_TFO
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_TLS_DEPRECATED_EC
|
||||
# define OPENSSL_NO_TLS_DEPRECATED_EC
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_TRACE
|
||||
# define OPENSSL_NO_TRACE
|
||||
# endif
|
||||
@@ -126,29 +158,66 @@ extern "C" {
|
||||
# ifndef OPENSSL_NO_WEAK_SSL_CIPHERS
|
||||
# define OPENSSL_NO_WEAK_SSL_CIPHERS
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_DYNAMIC_ENGINE
|
||||
# define OPENSSL_NO_DYNAMIC_ENGINE
|
||||
# ifndef OPENSSL_NO_WINSTORE
|
||||
# define OPENSSL_NO_WINSTORE
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_ZLIB
|
||||
# define OPENSSL_NO_ZLIB
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_ZLIB_DYNAMIC
|
||||
# define OPENSSL_NO_ZLIB_DYNAMIC
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_ZSTD
|
||||
# define OPENSSL_NO_ZSTD
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_ZSTD_DYNAMIC
|
||||
# define OPENSSL_NO_ZSTD_DYNAMIC
|
||||
# endif
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
/* Generate 80386 code? */
|
||||
/* clang-format off */
|
||||
# undef I386_ONLY
|
||||
/* clang-format on */
|
||||
|
||||
/*
|
||||
* The UEFI build supports both 32-bit and 64-bit builds from a single run
|
||||
* of the Configure script. To allow this, they define THIRTY_TWO_BIT and
|
||||
* SIXTY_FOUR_BIT appropriately for their builds, and we should not touch
|
||||
* them in that case.
|
||||
*/
|
||||
#if !defined(OPENSSL_SYS_UEFI)
|
||||
/* clang-format off */
|
||||
# undef BN_LLONG
|
||||
/* clang-format on */
|
||||
/* Only one for the following should be defined */
|
||||
/* clang-format off */
|
||||
# define SIXTY_FOUR_BIT_LONG
|
||||
/* clang-format on */
|
||||
/* clang-format off */
|
||||
# undef SIXTY_FOUR_BIT
|
||||
/* clang-format on */
|
||||
/* clang-format off */
|
||||
# undef THIRTY_TWO_BIT
|
||||
/* clang-format on */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The following are cipher-specific, but are part of the public API.
|
||||
*/
|
||||
# if !defined(OPENSSL_SYS_UEFI)
|
||||
# undef BN_LLONG
|
||||
/* Only one for the following should be defined */
|
||||
# define SIXTY_FOUR_BIT_LONG
|
||||
# undef SIXTY_FOUR_BIT
|
||||
# undef THIRTY_TWO_BIT
|
||||
# endif
|
||||
|
||||
/* clang-format off */
|
||||
# define RC4_INT unsigned int
|
||||
/* clang-format on */
|
||||
|
||||
# ifdef __cplusplus
|
||||
#if defined(OPENSSL_NO_COMP) || (defined(OPENSSL_NO_BROTLI) && defined(OPENSSL_NO_ZSTD) && defined(OPENSSL_NO_ZLIB))
|
||||
#define OPENSSL_NO_COMP_ALG
|
||||
#else
|
||||
#undef OPENSSL_NO_COMP_ALG
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif /* OPENSSL_CONFIGURATION_H */
|
||||
#endif /* OPENSSL_CONFIGURATION_H */
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* 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
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#ifndef OPENSSL_CONFTYPES_H
|
||||
#define OPENSSL_CONFTYPES_H
|
||||
#pragma once
|
||||
|
||||
#ifndef OPENSSL_CONF_H
|
||||
#include <openssl/conf.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The contents of this file are deprecated and will be made opaque
|
||||
*/
|
||||
struct conf_method_st {
|
||||
const char *name;
|
||||
CONF *(*create)(CONF_METHOD *meth);
|
||||
int (*init)(CONF *conf);
|
||||
int (*destroy)(CONF *conf);
|
||||
int (*destroy_data)(CONF *conf);
|
||||
int (*load_bio)(CONF *conf, BIO *bp, long *eline);
|
||||
int (*dump)(const CONF *conf, BIO *bp);
|
||||
int (*is_number)(const CONF *conf, char c);
|
||||
int (*to_int)(const CONF *conf, char c);
|
||||
int (*load)(CONF *conf, const char *name, long *eline);
|
||||
};
|
||||
|
||||
struct conf_st {
|
||||
CONF_METHOD *meth;
|
||||
void *meth_data;
|
||||
LHASH_OF(CONF_VALUE) *data;
|
||||
int flag_dollarid;
|
||||
int flag_abspath;
|
||||
char *includedir;
|
||||
OSSL_LIB_CTX *libctx;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,235 @@
|
||||
/*
|
||||
* Copyright 2019-2023 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* 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
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#ifndef OPENSSL_CORE_H
|
||||
#define OPENSSL_CORE_H
|
||||
#pragma once
|
||||
|
||||
#include <stddef.h>
|
||||
#include <openssl/types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*-
|
||||
* Base types
|
||||
* ----------
|
||||
*
|
||||
* These are the types that the OpenSSL core and providers have in common
|
||||
* to communicate data between them.
|
||||
*/
|
||||
|
||||
/* Opaque handles to be used with core upcall functions from providers */
|
||||
typedef struct ossl_core_handle_st OSSL_CORE_HANDLE;
|
||||
typedef struct openssl_core_ctx_st OPENSSL_CORE_CTX;
|
||||
typedef struct ossl_core_bio_st OSSL_CORE_BIO;
|
||||
|
||||
/*
|
||||
* Dispatch table element. function_id numbers and the functions are defined
|
||||
* in core_dispatch.h, see macros with 'OSSL_CORE_MAKE_FUNC' in their names.
|
||||
*
|
||||
* An array of these is always terminated by function_id == 0
|
||||
*/
|
||||
struct ossl_dispatch_st {
|
||||
int function_id;
|
||||
void (*function)(void);
|
||||
};
|
||||
|
||||
#define OSSL_DISPATCH_END \
|
||||
{ 0, NULL }
|
||||
|
||||
/*
|
||||
* Other items, essentially an int<->pointer map element.
|
||||
*
|
||||
* We make this type distinct from OSSL_DISPATCH to ensure that dispatch
|
||||
* tables remain tables with function pointers only.
|
||||
*
|
||||
* This is used whenever we need to pass things like a table of error reason
|
||||
* codes <-> reason string maps, ...
|
||||
*
|
||||
* Usage determines which field works as key if any, rather than field order.
|
||||
*
|
||||
* An array of these is always terminated by id == 0 && ptr == NULL
|
||||
*/
|
||||
struct ossl_item_st {
|
||||
unsigned int id;
|
||||
void *ptr;
|
||||
};
|
||||
|
||||
/*
|
||||
* Type to tie together algorithm names, property definition string and
|
||||
* the algorithm implementation in the form of a dispatch table.
|
||||
*
|
||||
* An array of these is always terminated by algorithm_names == NULL
|
||||
*/
|
||||
struct ossl_algorithm_st {
|
||||
const char *algorithm_names; /* key */
|
||||
const char *property_definition; /* key */
|
||||
const OSSL_DISPATCH *implementation;
|
||||
const char *algorithm_description;
|
||||
};
|
||||
|
||||
/*
|
||||
* Type to pass object data in a uniform way, without exposing the object
|
||||
* structure.
|
||||
*
|
||||
* An array of these is always terminated by key == NULL
|
||||
*/
|
||||
struct ossl_param_st {
|
||||
const char *key; /* the name of the parameter */
|
||||
unsigned int data_type; /* declare what kind of content is in buffer */
|
||||
void *data; /* value being passed in or out */
|
||||
size_t data_size; /* data size */
|
||||
size_t return_size; /* returned content size */
|
||||
};
|
||||
|
||||
/* Currently supported OSSL_PARAM data types */
|
||||
/*
|
||||
* OSSL_PARAM_INTEGER and OSSL_PARAM_UNSIGNED_INTEGER
|
||||
* are arbitrary length and therefore require an arbitrarily sized buffer,
|
||||
* since they may be used to pass numbers larger than what is natively
|
||||
* available.
|
||||
*
|
||||
* The number must be buffered in native form, i.e. MSB first on B_ENDIAN
|
||||
* systems and LSB first on L_ENDIAN systems. This means that arbitrary
|
||||
* native integers can be stored in the buffer, just make sure that the
|
||||
* buffer size is correct and the buffer itself is properly aligned (for
|
||||
* example by having the buffer field point at a C integer).
|
||||
*/
|
||||
#define OSSL_PARAM_INTEGER 1
|
||||
#define OSSL_PARAM_UNSIGNED_INTEGER 2
|
||||
/*-
|
||||
* OSSL_PARAM_REAL
|
||||
* is a C binary floating point values in native form and alignment.
|
||||
*/
|
||||
#define OSSL_PARAM_REAL 3
|
||||
/*-
|
||||
* OSSL_PARAM_UTF8_STRING
|
||||
* is a printable string. It is expected to be printed as it is.
|
||||
*/
|
||||
#define OSSL_PARAM_UTF8_STRING 4
|
||||
/*-
|
||||
* OSSL_PARAM_OCTET_STRING
|
||||
* is a string of bytes with no further specification. It is expected to be
|
||||
* printed as a hexdump.
|
||||
*/
|
||||
#define OSSL_PARAM_OCTET_STRING 5
|
||||
/*-
|
||||
* OSSL_PARAM_UTF8_PTR
|
||||
* is a pointer to a printable string. It is expected to be printed as it is.
|
||||
*
|
||||
* The difference between this and OSSL_PARAM_UTF8_STRING is that only pointers
|
||||
* are manipulated for this type.
|
||||
*
|
||||
* This is more relevant for parameter requests, where the responding
|
||||
* function doesn't need to copy the data to the provided buffer, but
|
||||
* sets the provided buffer to point at the actual data instead.
|
||||
*
|
||||
* WARNING! Using these is FRAGILE, as it assumes that the actual
|
||||
* data and its location are constant.
|
||||
*
|
||||
* EXTRA WARNING! If you are not completely sure you most likely want
|
||||
* to use the OSSL_PARAM_UTF8_STRING type.
|
||||
*/
|
||||
#define OSSL_PARAM_UTF8_PTR 6
|
||||
/*-
|
||||
* OSSL_PARAM_OCTET_PTR
|
||||
* is a pointer to a string of bytes with no further specification. It is
|
||||
* expected to be printed as a hexdump.
|
||||
*
|
||||
* The difference between this and OSSL_PARAM_OCTET_STRING is that only pointers
|
||||
* are manipulated for this type.
|
||||
*
|
||||
* This is more relevant for parameter requests, where the responding
|
||||
* function doesn't need to copy the data to the provided buffer, but
|
||||
* sets the provided buffer to point at the actual data instead.
|
||||
*
|
||||
* WARNING! Using these is FRAGILE, as it assumes that the actual
|
||||
* data and its location are constant.
|
||||
*
|
||||
* EXTRA WARNING! If you are not completely sure you most likely want
|
||||
* to use the OSSL_PARAM_OCTET_STRING type.
|
||||
*/
|
||||
#define OSSL_PARAM_OCTET_PTR 7
|
||||
|
||||
/*
|
||||
* Typedef for the thread stop handling callback. Used both internally and by
|
||||
* providers.
|
||||
*
|
||||
* Providers may register for notifications about threads stopping by
|
||||
* registering a callback to hear about such events. Providers register the
|
||||
* callback using the OSSL_FUNC_CORE_THREAD_START function in the |in| dispatch
|
||||
* table passed to OSSL_provider_init(). The arg passed back to a provider will
|
||||
* be the provider side context object.
|
||||
*/
|
||||
typedef void (*OSSL_thread_stop_handler_fn)(void *arg);
|
||||
|
||||
/*-
|
||||
* Provider entry point
|
||||
* --------------------
|
||||
*
|
||||
* This function is expected to be present in any dynamically loadable
|
||||
* provider module. By definition, if this function doesn't exist in a
|
||||
* module, that module is not an OpenSSL provider module.
|
||||
*/
|
||||
/*-
|
||||
* |handle| pointer to opaque type OSSL_CORE_HANDLE. This can be used
|
||||
* together with some functions passed via |in| to query data.
|
||||
* |in| is the array of functions that the Core passes to the provider.
|
||||
* |out| will be the array of base functions that the provider passes
|
||||
* back to the Core.
|
||||
* |provctx| a provider side context object, optionally created if the
|
||||
* provider needs it. This value is passed to other provider
|
||||
* functions, notably other context constructors.
|
||||
*/
|
||||
typedef int(OSSL_provider_init_fn)(const OSSL_CORE_HANDLE *handle,
|
||||
const OSSL_DISPATCH *in,
|
||||
const OSSL_DISPATCH **out,
|
||||
void **provctx);
|
||||
#ifdef __VMS
|
||||
#pragma names save
|
||||
#pragma names uppercase, truncated
|
||||
#endif
|
||||
OPENSSL_EXPORT OSSL_provider_init_fn OSSL_provider_init;
|
||||
#ifdef __VMS
|
||||
#pragma names restore
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Generic callback function signature.
|
||||
*
|
||||
* The expectation is that any provider function that wants to offer
|
||||
* a callback / hook can do so by taking an argument with this type,
|
||||
* as well as a pointer to caller-specific data. When calling the
|
||||
* callback, the provider function can populate an OSSL_PARAM array
|
||||
* with data of its choice and pass that in the callback call, along
|
||||
* with the caller data argument.
|
||||
*
|
||||
* libcrypto may use the OSSL_PARAM array to create arguments for an
|
||||
* application callback it knows about.
|
||||
*/
|
||||
typedef int(OSSL_CALLBACK)(const OSSL_PARAM params[], void *arg);
|
||||
typedef int(OSSL_INOUT_CALLBACK)(const OSSL_PARAM in_params[],
|
||||
OSSL_PARAM out_params[], void *arg);
|
||||
/*
|
||||
* Passphrase callback function signature
|
||||
*
|
||||
* This is similar to the generic callback function above, but adds a
|
||||
* result parameter.
|
||||
*/
|
||||
typedef int(OSSL_PASSPHRASE_CALLBACK)(char *pass, size_t pass_size,
|
||||
size_t *pass_len,
|
||||
const OSSL_PARAM params[], void *arg);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,600 @@
|
||||
/*
|
||||
* WARNING: do not edit!
|
||||
* Generated by Makefile from include/openssl/core_names.h.in
|
||||
*
|
||||
* Copyright 2019-2026 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* 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
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
/* clang-format off */
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
#ifndef OPENSSL_CORE_NAMES_H
|
||||
#define OPENSSL_CORE_NAMES_H
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* OSSL_CIPHER_PARAM_CTS_MODE Values */
|
||||
#define OSSL_CIPHER_CTS_MODE_CS1 "CS1"
|
||||
#define OSSL_CIPHER_CTS_MODE_CS2 "CS2"
|
||||
#define OSSL_CIPHER_CTS_MODE_CS3 "CS3"
|
||||
|
||||
/* Known CIPHER names (not a complete list) */
|
||||
#define OSSL_CIPHER_NAME_AES_128_GCM_SIV "AES-128-GCM-SIV"
|
||||
#define OSSL_CIPHER_NAME_AES_192_GCM_SIV "AES-192-GCM-SIV"
|
||||
#define OSSL_CIPHER_NAME_AES_256_GCM_SIV "AES-256-GCM-SIV"
|
||||
|
||||
/* Known DIGEST names (not a complete list) */
|
||||
#define OSSL_DIGEST_NAME_MD5 "MD5"
|
||||
#define OSSL_DIGEST_NAME_MD5_SHA1 "MD5-SHA1"
|
||||
#define OSSL_DIGEST_NAME_SHA1 "SHA1"
|
||||
#define OSSL_DIGEST_NAME_SHA2_224 "SHA2-224"
|
||||
#define OSSL_DIGEST_NAME_SHA2_256 "SHA2-256"
|
||||
#define OSSL_DIGEST_NAME_SHA2_256_192 "SHA2-256/192"
|
||||
#define OSSL_DIGEST_NAME_SHA2_384 "SHA2-384"
|
||||
#define OSSL_DIGEST_NAME_SHA2_512 "SHA2-512"
|
||||
#define OSSL_DIGEST_NAME_SHA2_512_224 "SHA2-512/224"
|
||||
#define OSSL_DIGEST_NAME_SHA2_512_256 "SHA2-512/256"
|
||||
#define OSSL_DIGEST_NAME_MD2 "MD2"
|
||||
#define OSSL_DIGEST_NAME_MD4 "MD4"
|
||||
#define OSSL_DIGEST_NAME_MDC2 "MDC2"
|
||||
#define OSSL_DIGEST_NAME_RIPEMD160 "RIPEMD160"
|
||||
#define OSSL_DIGEST_NAME_SHA3_224 "SHA3-224"
|
||||
#define OSSL_DIGEST_NAME_SHA3_256 "SHA3-256"
|
||||
#define OSSL_DIGEST_NAME_SHA3_384 "SHA3-384"
|
||||
#define OSSL_DIGEST_NAME_SHA3_512 "SHA3-512"
|
||||
#define OSSL_DIGEST_NAME_KECCAK_KMAC128 "KECCAK-KMAC-128"
|
||||
#define OSSL_DIGEST_NAME_KECCAK_KMAC256 "KECCAK-KMAC-256"
|
||||
#define OSSL_DIGEST_NAME_SM3 "SM3"
|
||||
|
||||
/* Known MAC names */
|
||||
#define OSSL_MAC_NAME_BLAKE2BMAC "BLAKE2BMAC"
|
||||
#define OSSL_MAC_NAME_BLAKE2SMAC "BLAKE2SMAC"
|
||||
#define OSSL_MAC_NAME_CMAC "CMAC"
|
||||
#define OSSL_MAC_NAME_GMAC "GMAC"
|
||||
#define OSSL_MAC_NAME_HMAC "HMAC"
|
||||
#define OSSL_MAC_NAME_KMAC128 "KMAC128"
|
||||
#define OSSL_MAC_NAME_KMAC256 "KMAC256"
|
||||
#define OSSL_MAC_NAME_POLY1305 "POLY1305"
|
||||
#define OSSL_MAC_NAME_SIPHASH "SIPHASH"
|
||||
|
||||
/* Known KDF names */
|
||||
#define OSSL_KDF_NAME_HKDF "HKDF"
|
||||
#define OSSL_KDF_NAME_HKDF_SHA256 "HKDF-SHA256"
|
||||
#define OSSL_KDF_NAME_HKDF_SHA384 "HKDF-SHA384"
|
||||
#define OSSL_KDF_NAME_HKDF_SHA512 "HKDF-SHA512"
|
||||
#define OSSL_KDF_NAME_TLS1_3_KDF "TLS13-KDF"
|
||||
#define OSSL_KDF_NAME_PBKDF1 "PBKDF1"
|
||||
#define OSSL_KDF_NAME_PBKDF2 "PBKDF2"
|
||||
#define OSSL_KDF_NAME_SCRYPT "SCRYPT"
|
||||
#define OSSL_KDF_NAME_SNMPKDF "SNMPKDF"
|
||||
#define OSSL_KDF_NAME_SRTPKDF "SRTPKDF"
|
||||
#define OSSL_KDF_NAME_SSHKDF "SSHKDF"
|
||||
#define OSSL_KDF_NAME_SSKDF "SSKDF"
|
||||
#define OSSL_KDF_NAME_TLS1_PRF "TLS1-PRF"
|
||||
#define OSSL_KDF_NAME_X942KDF_ASN1 "X942KDF-ASN1"
|
||||
#define OSSL_KDF_NAME_X942KDF_CONCAT "X942KDF-CONCAT"
|
||||
#define OSSL_KDF_NAME_X963KDF "X963KDF"
|
||||
#define OSSL_KDF_NAME_KBKDF "KBKDF"
|
||||
#define OSSL_KDF_NAME_KRB5KDF "KRB5KDF"
|
||||
#define OSSL_KDF_NAME_HMACDRBGKDF "HMAC-DRBG-KDF"
|
||||
|
||||
/* RSA padding modes */
|
||||
#define OSSL_PKEY_RSA_PAD_MODE_NONE "none"
|
||||
#define OSSL_PKEY_RSA_PAD_MODE_PKCSV15 "pkcs1"
|
||||
#define OSSL_PKEY_RSA_PAD_MODE_OAEP "oaep"
|
||||
#define OSSL_PKEY_RSA_PAD_MODE_X931 "x931"
|
||||
#define OSSL_PKEY_RSA_PAD_MODE_PSS "pss"
|
||||
|
||||
/* RSA pss padding salt length */
|
||||
#define OSSL_PKEY_RSA_PSS_SALT_LEN_DIGEST "digest"
|
||||
#define OSSL_PKEY_RSA_PSS_SALT_LEN_MAX "max"
|
||||
#define OSSL_PKEY_RSA_PSS_SALT_LEN_AUTO "auto"
|
||||
#define OSSL_PKEY_RSA_PSS_SALT_LEN_AUTO_DIGEST_MAX "auto-digestmax"
|
||||
|
||||
/* OSSL_PKEY_PARAM_EC_ENCODING values */
|
||||
#define OSSL_PKEY_EC_ENCODING_EXPLICIT "explicit"
|
||||
#define OSSL_PKEY_EC_ENCODING_GROUP "named_curve"
|
||||
|
||||
#define OSSL_PKEY_EC_POINT_CONVERSION_FORMAT_UNCOMPRESSED "uncompressed"
|
||||
#define OSSL_PKEY_EC_POINT_CONVERSION_FORMAT_COMPRESSED "compressed"
|
||||
#define OSSL_PKEY_EC_POINT_CONVERSION_FORMAT_HYBRID "hybrid"
|
||||
|
||||
#define OSSL_PKEY_EC_GROUP_CHECK_DEFAULT "default"
|
||||
#define OSSL_PKEY_EC_GROUP_CHECK_NAMED "named"
|
||||
#define OSSL_PKEY_EC_GROUP_CHECK_NAMED_NIST "named-nist"
|
||||
|
||||
/* PROV_SKEY well known key types */
|
||||
#define OSSL_SKEY_TYPE_GENERIC "GENERIC-SECRET"
|
||||
#define OSSL_SKEY_TYPE_AES "AES"
|
||||
|
||||
/* OSSL_KEM_PARAM_OPERATION values */
|
||||
#define OSSL_KEM_PARAM_OPERATION_RSASVE "RSASVE"
|
||||
#define OSSL_KEM_PARAM_OPERATION_DHKEM "DHKEM"
|
||||
|
||||
/* Parameter name definitions - generated by util/perl/OpenSSL/paramnames.pm */
|
||||
/* clang-format off */
|
||||
# define OSSL_ALG_PARAM_ALGORITHM_ID "algorithm-id"
|
||||
# define OSSL_ALG_PARAM_ALGORITHM_ID_PARAMS "algorithm-id-params"
|
||||
# define OSSL_ALG_PARAM_CIPHER "cipher"
|
||||
# define OSSL_ALG_PARAM_DIGEST "digest"
|
||||
# define OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR "fips-indicator"
|
||||
# define OSSL_ALG_PARAM_MAC "mac"
|
||||
# define OSSL_ALG_PARAM_PROPERTIES "properties"
|
||||
# define OSSL_ALG_PARAM_SECURITY_CATEGORY "security-category"
|
||||
# define OSSL_ASYM_CIPHER_PARAM_DIGEST OSSL_PKEY_PARAM_DIGEST
|
||||
# define OSSL_ASYM_CIPHER_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
||||
# define OSSL_ASYM_CIPHER_PARAM_FIPS_KEY_CHECK OSSL_PKEY_PARAM_FIPS_KEY_CHECK
|
||||
# define OSSL_ASYM_CIPHER_PARAM_FIPS_RSA_PKCS15_PAD_DISABLED OSSL_PROV_PARAM_RSA_PKCS15_PAD_DISABLED
|
||||
# define OSSL_ASYM_CIPHER_PARAM_IMPLICIT_REJECTION "implicit-rejection"
|
||||
# define OSSL_ASYM_CIPHER_PARAM_MGF1_DIGEST OSSL_PKEY_PARAM_MGF1_DIGEST
|
||||
# define OSSL_ASYM_CIPHER_PARAM_MGF1_DIGEST_PROPS OSSL_PKEY_PARAM_MGF1_PROPERTIES
|
||||
# define OSSL_ASYM_CIPHER_PARAM_OAEP_DIGEST OSSL_ALG_PARAM_DIGEST
|
||||
# define OSSL_ASYM_CIPHER_PARAM_OAEP_DIGEST_PROPS "digest-props"
|
||||
# define OSSL_ASYM_CIPHER_PARAM_OAEP_LABEL "oaep-label"
|
||||
# define OSSL_ASYM_CIPHER_PARAM_PAD_MODE OSSL_PKEY_PARAM_PAD_MODE
|
||||
# define OSSL_ASYM_CIPHER_PARAM_PROPERTIES OSSL_PKEY_PARAM_PROPERTIES
|
||||
# define OSSL_ASYM_CIPHER_PARAM_TLS_CLIENT_VERSION "tls-client-version"
|
||||
# define OSSL_ASYM_CIPHER_PARAM_TLS_NEGOTIATED_VERSION "tls-negotiated-version"
|
||||
# define OSSL_CAPABILITY_TLS_GROUP_ALG "tls-group-alg"
|
||||
# define OSSL_CAPABILITY_TLS_GROUP_ID "tls-group-id"
|
||||
# define OSSL_CAPABILITY_TLS_GROUP_IS_KEM "tls-group-is-kem"
|
||||
# define OSSL_CAPABILITY_TLS_GROUP_MAX_DTLS "tls-max-dtls"
|
||||
# define OSSL_CAPABILITY_TLS_GROUP_MAX_TLS "tls-max-tls"
|
||||
# define OSSL_CAPABILITY_TLS_GROUP_MIN_DTLS "tls-min-dtls"
|
||||
# define OSSL_CAPABILITY_TLS_GROUP_MIN_TLS "tls-min-tls"
|
||||
# define OSSL_CAPABILITY_TLS_GROUP_NAME "tls-group-name"
|
||||
# define OSSL_CAPABILITY_TLS_GROUP_NAME_INTERNAL "tls-group-name-internal"
|
||||
# define OSSL_CAPABILITY_TLS_GROUP_SECURITY_BITS "tls-group-sec-bits"
|
||||
# define OSSL_CAPABILITY_TLS_SIGALG_CODE_POINT "tls-sigalg-code-point"
|
||||
# define OSSL_CAPABILITY_TLS_SIGALG_HASH_NAME "tls-sigalg-hash-name"
|
||||
# define OSSL_CAPABILITY_TLS_SIGALG_HASH_OID "tls-sigalg-hash-oid"
|
||||
# define OSSL_CAPABILITY_TLS_SIGALG_IANA_NAME "tls-sigalg-iana-name"
|
||||
# define OSSL_CAPABILITY_TLS_SIGALG_KEYTYPE "tls-sigalg-keytype"
|
||||
# define OSSL_CAPABILITY_TLS_SIGALG_KEYTYPE_OID "tls-sigalg-keytype-oid"
|
||||
# define OSSL_CAPABILITY_TLS_SIGALG_MAX_DTLS "tls-max-dtls"
|
||||
# define OSSL_CAPABILITY_TLS_SIGALG_MAX_TLS "tls-max-tls"
|
||||
# define OSSL_CAPABILITY_TLS_SIGALG_MIN_DTLS "tls-min-dtls"
|
||||
# define OSSL_CAPABILITY_TLS_SIGALG_MIN_TLS "tls-min-tls"
|
||||
# define OSSL_CAPABILITY_TLS_SIGALG_NAME "tls-sigalg-name"
|
||||
# define OSSL_CAPABILITY_TLS_SIGALG_OID "tls-sigalg-oid"
|
||||
# define OSSL_CAPABILITY_TLS_SIGALG_SECURITY_BITS "tls-sigalg-sec-bits"
|
||||
# define OSSL_CAPABILITY_TLS_SIGALG_SIG_NAME "tls-sigalg-sig-name"
|
||||
# define OSSL_CAPABILITY_TLS_SIGALG_SIG_OID "tls-sigalg-sig-oid"
|
||||
# define OSSL_CIPHER_HMAC_PARAM_MAC OSSL_CIPHER_PARAM_AEAD_TAG
|
||||
# define OSSL_CIPHER_PARAM_AEAD "aead"
|
||||
# define OSSL_CIPHER_PARAM_AEAD_IVLEN OSSL_CIPHER_PARAM_IVLEN
|
||||
# define OSSL_CIPHER_PARAM_AEAD_IV_GENERATED "iv-generated"
|
||||
# define OSSL_CIPHER_PARAM_AEAD_MAC_KEY "mackey"
|
||||
# define OSSL_CIPHER_PARAM_AEAD_TAG "tag"
|
||||
# define OSSL_CIPHER_PARAM_AEAD_TAGLEN "taglen"
|
||||
# define OSSL_CIPHER_PARAM_AEAD_TLS1_AAD "tlsaad"
|
||||
# define OSSL_CIPHER_PARAM_AEAD_TLS1_AAD_PAD "tlsaadpad"
|
||||
# define OSSL_CIPHER_PARAM_AEAD_TLS1_GET_IV_GEN "tlsivgen"
|
||||
# define OSSL_CIPHER_PARAM_AEAD_TLS1_IV_FIXED "tlsivfixed"
|
||||
# define OSSL_CIPHER_PARAM_AEAD_TLS1_SET_IV_INV "tlsivinv"
|
||||
# define OSSL_CIPHER_PARAM_ALGORITHM_ID OSSL_ALG_PARAM_ALGORITHM_ID
|
||||
# define OSSL_CIPHER_PARAM_ALGORITHM_ID_PARAMS OSSL_ALG_PARAM_ALGORITHM_ID_PARAMS
|
||||
# define OSSL_CIPHER_PARAM_ALGORITHM_ID_PARAMS_OLD "alg_id_param"
|
||||
# define OSSL_CIPHER_PARAM_BLOCK_SIZE "blocksize"
|
||||
# define OSSL_CIPHER_PARAM_CTS "cts"
|
||||
# define OSSL_CIPHER_PARAM_CTS_MODE "cts_mode"
|
||||
# define OSSL_CIPHER_PARAM_CUSTOM_IV "custom-iv"
|
||||
# define OSSL_CIPHER_PARAM_DECRYPT_ONLY "decrypt-only"
|
||||
# define OSSL_CIPHER_PARAM_ENCRYPT_THEN_MAC "encrypt-then-mac"
|
||||
# define OSSL_CIPHER_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
||||
# define OSSL_CIPHER_PARAM_FIPS_ENCRYPT_CHECK "encrypt-check"
|
||||
# define OSSL_CIPHER_PARAM_HAS_RAND_KEY "has-randkey"
|
||||
# define OSSL_CIPHER_PARAM_IV "iv"
|
||||
# define OSSL_CIPHER_PARAM_IVLEN "ivlen"
|
||||
# define OSSL_CIPHER_PARAM_KEYLEN "keylen"
|
||||
# define OSSL_CIPHER_PARAM_MODE "mode"
|
||||
# define OSSL_CIPHER_PARAM_NUM "num"
|
||||
# define OSSL_CIPHER_PARAM_PADDING "padding"
|
||||
# define OSSL_CIPHER_PARAM_PIPELINE_AEAD_TAG "pipeline-tag"
|
||||
# define OSSL_CIPHER_PARAM_RANDOM_KEY "randkey"
|
||||
# define OSSL_CIPHER_PARAM_RC2_KEYBITS "keybits"
|
||||
# define OSSL_CIPHER_PARAM_ROUNDS "rounds"
|
||||
# define OSSL_CIPHER_PARAM_SPEED "speed"
|
||||
# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK "tls-multi"
|
||||
# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_AAD "tls1multi_aad"
|
||||
# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_AAD_PACKLEN "tls1multi_aadpacklen"
|
||||
# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_ENC "tls1multi_enc"
|
||||
# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_ENC_IN "tls1multi_encin"
|
||||
# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_ENC_LEN "tls1multi_enclen"
|
||||
# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_INTERLEAVE "tls1multi_interleave"
|
||||
# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_MAX_BUFSIZE "tls1multi_maxbufsz"
|
||||
# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_MAX_SEND_FRAGMENT "tls1multi_maxsndfrag"
|
||||
# define OSSL_CIPHER_PARAM_TLS_MAC "tls-mac"
|
||||
# define OSSL_CIPHER_PARAM_TLS_MAC_SIZE "tls-mac-size"
|
||||
# define OSSL_CIPHER_PARAM_TLS_VERSION "tls-version"
|
||||
# define OSSL_CIPHER_PARAM_UPDATED_IV "updated-iv"
|
||||
# define OSSL_CIPHER_PARAM_USE_BITS "use-bits"
|
||||
# define OSSL_CIPHER_PARAM_XTS_STANDARD "xts_standard"
|
||||
# define OSSL_DECODER_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
|
||||
# define OSSL_DIGEST_PARAM_ALGID_ABSENT "algid-absent"
|
||||
# define OSSL_DIGEST_PARAM_BLOCK_SIZE "blocksize"
|
||||
# define OSSL_DIGEST_PARAM_CUSTOMIZATION "customization"
|
||||
# define OSSL_DIGEST_PARAM_FUNCTION_NAME "function-name"
|
||||
# define OSSL_DIGEST_PARAM_MICALG "micalg"
|
||||
# define OSSL_DIGEST_PARAM_MU_CONTEXT_STRING "context-string"
|
||||
# define OSSL_DIGEST_PARAM_MU_DIGEST OSSL_ALG_PARAM_DIGEST
|
||||
# define OSSL_DIGEST_PARAM_MU_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
|
||||
# define OSSL_DIGEST_PARAM_MU_PUB_KEY "pub"
|
||||
# define OSSL_DIGEST_PARAM_PAD_TYPE "pad-type"
|
||||
# define OSSL_DIGEST_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
|
||||
# define OSSL_DIGEST_PARAM_SIZE "size"
|
||||
# define OSSL_DIGEST_PARAM_SSL3_MS "ssl3-ms"
|
||||
# define OSSL_DIGEST_PARAM_XOF "xof"
|
||||
# define OSSL_DIGEST_PARAM_XOFLEN "xoflen"
|
||||
# define OSSL_DRBG_PARAM_CIPHER OSSL_ALG_PARAM_CIPHER
|
||||
# define OSSL_DRBG_PARAM_DIGEST OSSL_ALG_PARAM_DIGEST
|
||||
# define OSSL_DRBG_PARAM_ENTROPY_REQUIRED "entropy_required"
|
||||
# define OSSL_DRBG_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
||||
# define OSSL_DRBG_PARAM_FIPS_DIGEST_CHECK OSSL_PKEY_PARAM_FIPS_DIGEST_CHECK
|
||||
# define OSSL_DRBG_PARAM_MAC OSSL_ALG_PARAM_MAC
|
||||
# define OSSL_DRBG_PARAM_MAX_ADINLEN "max_adinlen"
|
||||
# define OSSL_DRBG_PARAM_MAX_ENTROPYLEN "max_entropylen"
|
||||
# define OSSL_DRBG_PARAM_MAX_LENGTH "maxium_length"
|
||||
# define OSSL_DRBG_PARAM_MAX_NONCELEN "max_noncelen"
|
||||
# define OSSL_DRBG_PARAM_MAX_PERSLEN "max_perslen"
|
||||
# define OSSL_DRBG_PARAM_MIN_ENTROPYLEN "min_entropylen"
|
||||
# define OSSL_DRBG_PARAM_MIN_LENGTH "minium_length"
|
||||
# define OSSL_DRBG_PARAM_MIN_NONCELEN "min_noncelen"
|
||||
# define OSSL_DRBG_PARAM_PREDICTION_RESISTANCE "prediction_resistance"
|
||||
# define OSSL_DRBG_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
|
||||
# define OSSL_DRBG_PARAM_RANDOM_DATA "random_data"
|
||||
# define OSSL_DRBG_PARAM_RESEED_COUNTER "reseed_counter"
|
||||
# define OSSL_DRBG_PARAM_RESEED_REQUESTS "reseed_requests"
|
||||
# define OSSL_DRBG_PARAM_RESEED_TIME "reseed_time"
|
||||
# define OSSL_DRBG_PARAM_RESEED_TIME_INTERVAL "reseed_time_interval"
|
||||
# define OSSL_DRBG_PARAM_SIZE "size"
|
||||
# define OSSL_DRBG_PARAM_USE_DF "use_derivation_function"
|
||||
# define OSSL_ENCODER_PARAM_CIPHER OSSL_ALG_PARAM_CIPHER
|
||||
# define OSSL_ENCODER_PARAM_ENCRYPT_LEVEL "encrypt-level"
|
||||
# define OSSL_ENCODER_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
|
||||
# define OSSL_ENCODER_PARAM_SAVE_PARAMETERS "save-parameters"
|
||||
# define OSSL_EXCHANGE_PARAM_EC_ECDH_COFACTOR_MODE "ecdh-cofactor-mode"
|
||||
# define OSSL_EXCHANGE_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
||||
# define OSSL_EXCHANGE_PARAM_FIPS_DIGEST_CHECK OSSL_PKEY_PARAM_FIPS_DIGEST_CHECK
|
||||
# define OSSL_EXCHANGE_PARAM_FIPS_ECDH_COFACTOR_CHECK OSSL_PROV_PARAM_ECDH_COFACTOR_CHECK
|
||||
# define OSSL_EXCHANGE_PARAM_FIPS_KEY_CHECK OSSL_PKEY_PARAM_FIPS_KEY_CHECK
|
||||
# define OSSL_EXCHANGE_PARAM_KDF_DIGEST "kdf-digest"
|
||||
# define OSSL_EXCHANGE_PARAM_KDF_DIGEST_PROPS "kdf-digest-props"
|
||||
# define OSSL_EXCHANGE_PARAM_KDF_OUTLEN "kdf-outlen"
|
||||
# define OSSL_EXCHANGE_PARAM_KDF_TYPE "kdf-type"
|
||||
# define OSSL_EXCHANGE_PARAM_KDF_UKM "kdf-ukm"
|
||||
# define OSSL_EXCHANGE_PARAM_PAD "pad"
|
||||
# define OSSL_GEN_PARAM_ITERATION "iteration"
|
||||
# define OSSL_GEN_PARAM_POTENTIAL "potential"
|
||||
# define OSSL_KDF_PARAM_ARGON2_AD "ad"
|
||||
# define OSSL_KDF_PARAM_ARGON2_LANES "lanes"
|
||||
# define OSSL_KDF_PARAM_ARGON2_MEMCOST "memcost"
|
||||
# define OSSL_KDF_PARAM_ARGON2_VERSION "version"
|
||||
# define OSSL_KDF_PARAM_CEK_ALG "cekalg"
|
||||
# define OSSL_KDF_PARAM_CIPHER OSSL_ALG_PARAM_CIPHER
|
||||
# define OSSL_KDF_PARAM_CONSTANT "constant"
|
||||
# define OSSL_KDF_PARAM_DATA "data"
|
||||
# define OSSL_KDF_PARAM_DIGEST OSSL_ALG_PARAM_DIGEST
|
||||
# define OSSL_KDF_PARAM_EARLY_CLEAN "early_clean"
|
||||
# define OSSL_KDF_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
||||
# define OSSL_KDF_PARAM_FIPS_DIGEST_CHECK OSSL_PKEY_PARAM_FIPS_DIGEST_CHECK
|
||||
# define OSSL_KDF_PARAM_FIPS_EMS_CHECK "ems_check"
|
||||
# define OSSL_KDF_PARAM_FIPS_KEY_CHECK OSSL_PKEY_PARAM_FIPS_KEY_CHECK
|
||||
# define OSSL_KDF_PARAM_HMACDRBG_ENTROPY "entropy"
|
||||
# define OSSL_KDF_PARAM_HMACDRBG_NONCE "nonce"
|
||||
# define OSSL_KDF_PARAM_INFO "info"
|
||||
# define OSSL_KDF_PARAM_ITER "iter"
|
||||
# define OSSL_KDF_PARAM_KBKDF_R "r"
|
||||
# define OSSL_KDF_PARAM_KBKDF_USE_L "use-l"
|
||||
# define OSSL_KDF_PARAM_KBKDF_USE_SEPARATOR "use-separator"
|
||||
# define OSSL_KDF_PARAM_KEY "key"
|
||||
# define OSSL_KDF_PARAM_LABEL "label"
|
||||
# define OSSL_KDF_PARAM_MAC OSSL_ALG_PARAM_MAC
|
||||
# define OSSL_KDF_PARAM_MAC_SIZE "maclen"
|
||||
# define OSSL_KDF_PARAM_MODE "mode"
|
||||
# define OSSL_KDF_PARAM_PASSWORD "pass"
|
||||
# define OSSL_KDF_PARAM_PKCS12_ID "id"
|
||||
# define OSSL_KDF_PARAM_PKCS5 "pkcs5"
|
||||
# define OSSL_KDF_PARAM_PREFIX "prefix"
|
||||
# define OSSL_KDF_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
|
||||
# define OSSL_KDF_PARAM_SALT "salt"
|
||||
# define OSSL_KDF_PARAM_SCRYPT_MAXMEM "maxmem_bytes"
|
||||
# define OSSL_KDF_PARAM_SCRYPT_N "n"
|
||||
# define OSSL_KDF_PARAM_SCRYPT_P "p"
|
||||
# define OSSL_KDF_PARAM_SCRYPT_R "r"
|
||||
# define OSSL_KDF_PARAM_SECRET "secret"
|
||||
# define OSSL_KDF_PARAM_SEED "seed"
|
||||
# define OSSL_KDF_PARAM_SIZE "size"
|
||||
# define OSSL_KDF_PARAM_SNMPKDF_EID "eid"
|
||||
# define OSSL_KDF_PARAM_SRTPKDF_INDEX "index"
|
||||
# define OSSL_KDF_PARAM_SRTPKDF_KDR "kdr"
|
||||
# define OSSL_KDF_PARAM_SRTPKDF_LABEL "label"
|
||||
# define OSSL_KDF_PARAM_SSHKDF_SESSION_ID "session_id"
|
||||
# define OSSL_KDF_PARAM_SSHKDF_TYPE "type"
|
||||
# define OSSL_KDF_PARAM_SSHKDF_XCGHASH "xcghash"
|
||||
# define OSSL_KDF_PARAM_THREADS "threads"
|
||||
# define OSSL_KDF_PARAM_UKM "ukm"
|
||||
# define OSSL_KDF_PARAM_X942_ACVPINFO "acvp-info"
|
||||
# define OSSL_KDF_PARAM_X942_PARTYUINFO "partyu-info"
|
||||
# define OSSL_KDF_PARAM_X942_PARTYVINFO "partyv-info"
|
||||
# define OSSL_KDF_PARAM_X942_SUPP_PRIVINFO "supp-privinfo"
|
||||
# define OSSL_KDF_PARAM_X942_SUPP_PUBINFO "supp-pubinfo"
|
||||
# define OSSL_KDF_PARAM_X942_USE_KEYBITS "use-keybits"
|
||||
# define OSSL_KEM_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
||||
# define OSSL_KEM_PARAM_FIPS_KEY_CHECK OSSL_PKEY_PARAM_FIPS_KEY_CHECK
|
||||
# define OSSL_KEM_PARAM_IKME "ikme"
|
||||
# define OSSL_KEM_PARAM_OPERATION "operation"
|
||||
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_BLOCK_PADDING "block_padding"
|
||||
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_HS_PADDING "hs_padding"
|
||||
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_MAX_EARLY_DATA "max_early_data"
|
||||
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_MAX_FRAG_LEN "max_frag_len"
|
||||
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_MODE "mode"
|
||||
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_OPTIONS "options"
|
||||
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_READ_AHEAD "read_ahead"
|
||||
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_STREAM_MAC "stream_mac"
|
||||
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_TLSTREE "tlstree"
|
||||
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_USE_ETM "use_etm"
|
||||
# define OSSL_LIBSSL_RECORD_LAYER_READ_BUFFER_LEN "read_buffer_len"
|
||||
# define OSSL_MAC_PARAM_BLOCK_SIZE "block-size"
|
||||
# define OSSL_MAC_PARAM_CIPHER OSSL_ALG_PARAM_CIPHER
|
||||
# define OSSL_MAC_PARAM_CUSTOM "custom"
|
||||
# define OSSL_MAC_PARAM_C_ROUNDS "c-rounds"
|
||||
# define OSSL_MAC_PARAM_DIGEST OSSL_ALG_PARAM_DIGEST
|
||||
# define OSSL_MAC_PARAM_DIGEST_NOINIT "digest-noinit"
|
||||
# define OSSL_MAC_PARAM_DIGEST_ONESHOT "digest-oneshot"
|
||||
# define OSSL_MAC_PARAM_D_ROUNDS "d-rounds"
|
||||
# define OSSL_MAC_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
||||
# define OSSL_MAC_PARAM_FIPS_KEY_CHECK OSSL_PKEY_PARAM_FIPS_KEY_CHECK
|
||||
# define OSSL_MAC_PARAM_FIPS_NO_SHORT_MAC OSSL_PROV_PARAM_NO_SHORT_MAC
|
||||
# define OSSL_MAC_PARAM_IV "iv"
|
||||
# define OSSL_MAC_PARAM_KEY "key"
|
||||
# define OSSL_MAC_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
|
||||
# define OSSL_MAC_PARAM_SALT "salt"
|
||||
# define OSSL_MAC_PARAM_SIZE "size"
|
||||
# define OSSL_MAC_PARAM_TLS_DATA_SIZE "tls-data-size"
|
||||
# define OSSL_MAC_PARAM_XOF "xof"
|
||||
# define OSSL_OBJECT_PARAM_DATA "data"
|
||||
# define OSSL_OBJECT_PARAM_DATA_STRUCTURE "data-structure"
|
||||
# define OSSL_OBJECT_PARAM_DATA_TYPE "data-type"
|
||||
# define OSSL_OBJECT_PARAM_DESC "desc"
|
||||
# define OSSL_OBJECT_PARAM_INPUT_TYPE "input-type"
|
||||
# define OSSL_OBJECT_PARAM_REFERENCE "reference"
|
||||
# define OSSL_OBJECT_PARAM_TYPE "type"
|
||||
# define OSSL_PASSPHRASE_PARAM_INFO "info"
|
||||
# define OSSL_PKEY_PARAM_ALGORITHM_ID OSSL_ALG_PARAM_ALGORITHM_ID
|
||||
# define OSSL_PKEY_PARAM_ALGORITHM_ID_PARAMS OSSL_ALG_PARAM_ALGORITHM_ID_PARAMS
|
||||
# define OSSL_PKEY_PARAM_BITS "bits"
|
||||
# define OSSL_PKEY_PARAM_CIPHER OSSL_ALG_PARAM_CIPHER
|
||||
# define OSSL_PKEY_PARAM_CMS_KEMRI_KDF_ALGORITHM "kemri-kdf-alg"
|
||||
# define OSSL_PKEY_PARAM_CMS_RI_TYPE "ri-type"
|
||||
# define OSSL_PKEY_PARAM_DEFAULT_DIGEST "default-digest"
|
||||
# define OSSL_PKEY_PARAM_DHKEM_IKM "dhkem-ikm"
|
||||
# define OSSL_PKEY_PARAM_DH_GENERATOR "safeprime-generator"
|
||||
# define OSSL_PKEY_PARAM_DH_PRIV_LEN "priv_len"
|
||||
# define OSSL_PKEY_PARAM_DIGEST OSSL_ALG_PARAM_DIGEST
|
||||
# define OSSL_PKEY_PARAM_DIGEST_SIZE "digest-size"
|
||||
# define OSSL_PKEY_PARAM_DIST_ID "distid"
|
||||
# define OSSL_PKEY_PARAM_EC_A "a"
|
||||
# define OSSL_PKEY_PARAM_EC_B "b"
|
||||
# define OSSL_PKEY_PARAM_EC_CHAR2_M "m"
|
||||
# define OSSL_PKEY_PARAM_EC_CHAR2_PP_K1 "k1"
|
||||
# define OSSL_PKEY_PARAM_EC_CHAR2_PP_K2 "k2"
|
||||
# define OSSL_PKEY_PARAM_EC_CHAR2_PP_K3 "k3"
|
||||
# define OSSL_PKEY_PARAM_EC_CHAR2_TP_BASIS "tp"
|
||||
# define OSSL_PKEY_PARAM_EC_CHAR2_TYPE "basis-type"
|
||||
# define OSSL_PKEY_PARAM_EC_COFACTOR "cofactor"
|
||||
# define OSSL_PKEY_PARAM_EC_DECODED_FROM_EXPLICIT_PARAMS "decoded-from-explicit"
|
||||
# define OSSL_PKEY_PARAM_EC_ENCODING "encoding"
|
||||
# define OSSL_PKEY_PARAM_EC_FIELD_DEGREE "field-degree"
|
||||
# define OSSL_PKEY_PARAM_EC_FIELD_TYPE "field-type"
|
||||
# define OSSL_PKEY_PARAM_EC_GENERATOR "generator"
|
||||
# define OSSL_PKEY_PARAM_EC_GROUP_CHECK_TYPE "group-check"
|
||||
# define OSSL_PKEY_PARAM_EC_INCLUDE_PUBLIC "include-public"
|
||||
# define OSSL_PKEY_PARAM_EC_ORDER "order"
|
||||
# define OSSL_PKEY_PARAM_EC_P "p"
|
||||
# define OSSL_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT "point-format"
|
||||
# define OSSL_PKEY_PARAM_EC_PUB_X "qx"
|
||||
# define OSSL_PKEY_PARAM_EC_PUB_Y "qy"
|
||||
# define OSSL_PKEY_PARAM_EC_SEED "seed"
|
||||
# define OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY "encoded-pub-key"
|
||||
# define OSSL_PKEY_PARAM_FFC_COFACTOR "j"
|
||||
# define OSSL_PKEY_PARAM_FFC_DIGEST OSSL_PKEY_PARAM_DIGEST
|
||||
# define OSSL_PKEY_PARAM_FFC_DIGEST_PROPS OSSL_PKEY_PARAM_PROPERTIES
|
||||
# define OSSL_PKEY_PARAM_FFC_G "g"
|
||||
# define OSSL_PKEY_PARAM_FFC_GINDEX "gindex"
|
||||
# define OSSL_PKEY_PARAM_FFC_H "hindex"
|
||||
# define OSSL_PKEY_PARAM_FFC_P "p"
|
||||
# define OSSL_PKEY_PARAM_FFC_PBITS "pbits"
|
||||
# define OSSL_PKEY_PARAM_FFC_PCOUNTER "pcounter"
|
||||
# define OSSL_PKEY_PARAM_FFC_Q "q"
|
||||
# define OSSL_PKEY_PARAM_FFC_QBITS "qbits"
|
||||
# define OSSL_PKEY_PARAM_FFC_SEED "seed"
|
||||
# define OSSL_PKEY_PARAM_FFC_TYPE "type"
|
||||
# define OSSL_PKEY_PARAM_FFC_VALIDATE_G "validate-g"
|
||||
# define OSSL_PKEY_PARAM_FFC_VALIDATE_LEGACY "validate-legacy"
|
||||
# define OSSL_PKEY_PARAM_FFC_VALIDATE_PQ "validate-pq"
|
||||
# define OSSL_PKEY_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
||||
# define OSSL_PKEY_PARAM_FIPS_DIGEST_CHECK "digest-check"
|
||||
# define OSSL_PKEY_PARAM_FIPS_KEY_CHECK "key-check"
|
||||
# define OSSL_PKEY_PARAM_FIPS_SIGN_CHECK "sign-check"
|
||||
# define OSSL_PKEY_PARAM_GROUP_NAME "group"
|
||||
# define OSSL_PKEY_PARAM_IMPLICIT_REJECTION "implicit-rejection"
|
||||
# define OSSL_PKEY_PARAM_MANDATORY_DIGEST "mandatory-digest"
|
||||
# define OSSL_PKEY_PARAM_MASKGENFUNC "mgf"
|
||||
# define OSSL_PKEY_PARAM_MAX_SIZE "max-size"
|
||||
# define OSSL_PKEY_PARAM_MGF1_DIGEST "mgf1-digest"
|
||||
# define OSSL_PKEY_PARAM_MGF1_PROPERTIES "mgf1-properties"
|
||||
# define OSSL_PKEY_PARAM_ML_DSA_INPUT_FORMATS "ml-dsa.input_formats"
|
||||
# define OSSL_PKEY_PARAM_ML_DSA_OUTPUT_FORMATS "ml-dsa.output_formats"
|
||||
# define OSSL_PKEY_PARAM_ML_DSA_PREFER_SEED "ml-dsa.prefer_seed"
|
||||
# define OSSL_PKEY_PARAM_ML_DSA_RETAIN_SEED "ml-dsa.retain_seed"
|
||||
# define OSSL_PKEY_PARAM_ML_DSA_SEED "seed"
|
||||
# define OSSL_PKEY_PARAM_ML_KEM_IMPORT_PCT_TYPE "ml-kem.import_pct_type"
|
||||
# define OSSL_PKEY_PARAM_ML_KEM_INPUT_FORMATS "ml-kem.input_formats"
|
||||
# define OSSL_PKEY_PARAM_ML_KEM_OUTPUT_FORMATS "ml-kem.output_formats"
|
||||
# define OSSL_PKEY_PARAM_ML_KEM_PREFER_SEED "ml-kem.prefer_seed"
|
||||
# define OSSL_PKEY_PARAM_ML_KEM_RETAIN_SEED "ml-kem.retain_seed"
|
||||
# define OSSL_PKEY_PARAM_ML_KEM_SEED "seed"
|
||||
# define OSSL_PKEY_PARAM_OUTPUT_FORMATS "output_formats"
|
||||
# define OSSL_PKEY_PARAM_PAD_MODE "pad-mode"
|
||||
# define OSSL_PKEY_PARAM_PRIV_KEY "priv"
|
||||
# define OSSL_PKEY_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
|
||||
# define OSSL_PKEY_PARAM_PUB_KEY "pub"
|
||||
# define OSSL_PKEY_PARAM_RSA_A "rsa-a"
|
||||
# define OSSL_PKEY_PARAM_RSA_B "rsa-b"
|
||||
# define OSSL_PKEY_PARAM_RSA_BITS OSSL_PKEY_PARAM_BITS
|
||||
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT "rsa-coefficient"
|
||||
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT1 "rsa-coefficient1"
|
||||
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT2 "rsa-coefficient2"
|
||||
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT3 "rsa-coefficient3"
|
||||
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT4 "rsa-coefficient4"
|
||||
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT5 "rsa-coefficient5"
|
||||
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT6 "rsa-coefficient6"
|
||||
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT7 "rsa-coefficient7"
|
||||
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT8 "rsa-coefficient8"
|
||||
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT9 "rsa-coefficient9"
|
||||
# define OSSL_PKEY_PARAM_RSA_D "d"
|
||||
# define OSSL_PKEY_PARAM_RSA_DERIVE_FROM_PQ "rsa-derive-from-pq"
|
||||
# define OSSL_PKEY_PARAM_RSA_DIGEST OSSL_PKEY_PARAM_DIGEST
|
||||
# define OSSL_PKEY_PARAM_RSA_DIGEST_PROPS OSSL_PKEY_PARAM_PROPERTIES
|
||||
# define OSSL_PKEY_PARAM_RSA_E "e"
|
||||
# define OSSL_PKEY_PARAM_RSA_EXPONENT "rsa-exponent"
|
||||
# define OSSL_PKEY_PARAM_RSA_EXPONENT1 "rsa-exponent1"
|
||||
# define OSSL_PKEY_PARAM_RSA_EXPONENT10 "rsa-exponent10"
|
||||
# define OSSL_PKEY_PARAM_RSA_EXPONENT2 "rsa-exponent2"
|
||||
# define OSSL_PKEY_PARAM_RSA_EXPONENT3 "rsa-exponent3"
|
||||
# define OSSL_PKEY_PARAM_RSA_EXPONENT4 "rsa-exponent4"
|
||||
# define OSSL_PKEY_PARAM_RSA_EXPONENT5 "rsa-exponent5"
|
||||
# define OSSL_PKEY_PARAM_RSA_EXPONENT6 "rsa-exponent6"
|
||||
# define OSSL_PKEY_PARAM_RSA_EXPONENT7 "rsa-exponent7"
|
||||
# define OSSL_PKEY_PARAM_RSA_EXPONENT8 "rsa-exponent8"
|
||||
# define OSSL_PKEY_PARAM_RSA_EXPONENT9 "rsa-exponent9"
|
||||
# define OSSL_PKEY_PARAM_RSA_FACTOR "rsa-factor"
|
||||
# define OSSL_PKEY_PARAM_RSA_FACTOR1 "rsa-factor1"
|
||||
# define OSSL_PKEY_PARAM_RSA_FACTOR10 "rsa-factor10"
|
||||
# define OSSL_PKEY_PARAM_RSA_FACTOR2 "rsa-factor2"
|
||||
# define OSSL_PKEY_PARAM_RSA_FACTOR3 "rsa-factor3"
|
||||
# define OSSL_PKEY_PARAM_RSA_FACTOR4 "rsa-factor4"
|
||||
# define OSSL_PKEY_PARAM_RSA_FACTOR5 "rsa-factor5"
|
||||
# define OSSL_PKEY_PARAM_RSA_FACTOR6 "rsa-factor6"
|
||||
# define OSSL_PKEY_PARAM_RSA_FACTOR7 "rsa-factor7"
|
||||
# define OSSL_PKEY_PARAM_RSA_FACTOR8 "rsa-factor8"
|
||||
# define OSSL_PKEY_PARAM_RSA_FACTOR9 "rsa-factor9"
|
||||
# define OSSL_PKEY_PARAM_RSA_MASKGENFUNC OSSL_PKEY_PARAM_MASKGENFUNC
|
||||
# define OSSL_PKEY_PARAM_RSA_MGF1_DIGEST OSSL_PKEY_PARAM_MGF1_DIGEST
|
||||
# define OSSL_PKEY_PARAM_RSA_N "n"
|
||||
# define OSSL_PKEY_PARAM_RSA_PRIMES "primes"
|
||||
# define OSSL_PKEY_PARAM_RSA_PSS_SALTLEN "saltlen"
|
||||
# define OSSL_PKEY_PARAM_RSA_TEST_P1 "p1"
|
||||
# define OSSL_PKEY_PARAM_RSA_TEST_P2 "p2"
|
||||
# define OSSL_PKEY_PARAM_RSA_TEST_Q1 "q1"
|
||||
# define OSSL_PKEY_PARAM_RSA_TEST_Q2 "q2"
|
||||
# define OSSL_PKEY_PARAM_RSA_TEST_XP "xp"
|
||||
# define OSSL_PKEY_PARAM_RSA_TEST_XP1 "xp1"
|
||||
# define OSSL_PKEY_PARAM_RSA_TEST_XP2 "xp2"
|
||||
# define OSSL_PKEY_PARAM_RSA_TEST_XQ "xq"
|
||||
# define OSSL_PKEY_PARAM_RSA_TEST_XQ1 "xq1"
|
||||
# define OSSL_PKEY_PARAM_RSA_TEST_XQ2 "xq2"
|
||||
# define OSSL_PKEY_PARAM_SECURITY_BITS "security-bits"
|
||||
# define OSSL_PKEY_PARAM_SECURITY_CATEGORY OSSL_ALG_PARAM_SECURITY_CATEGORY
|
||||
# define OSSL_PKEY_PARAM_SLH_DSA_SEED "seed"
|
||||
# define OSSL_PKEY_PARAM_USE_COFACTOR_ECDH OSSL_PKEY_PARAM_USE_COFACTOR_FLAG
|
||||
# define OSSL_PKEY_PARAM_USE_COFACTOR_FLAG "use-cofactor-flag"
|
||||
# define OSSL_PROV_PARAM_BUILDINFO "buildinfo"
|
||||
# define OSSL_PROV_PARAM_CORE_MODULE_FILENAME "module-filename"
|
||||
# define OSSL_PROV_PARAM_CORE_PROV_NAME "provider-name"
|
||||
# define OSSL_PROV_PARAM_CORE_VERSION "openssl-version"
|
||||
# define OSSL_PROV_PARAM_DRBG_TRUNC_DIGEST "drbg-no-trunc-md"
|
||||
# define OSSL_PROV_PARAM_DSA_SIGN_DISABLED "dsa-sign-disabled"
|
||||
# define OSSL_PROV_PARAM_ECDH_COFACTOR_CHECK "ecdh-cofactor-check"
|
||||
# define OSSL_PROV_PARAM_HKDF_DIGEST_CHECK "hkdf-digest-check"
|
||||
# define OSSL_PROV_PARAM_HKDF_KEY_CHECK "hkdf-key-check"
|
||||
# define OSSL_PROV_PARAM_HMAC_KEY_CHECK "hmac-key-check"
|
||||
# define OSSL_PROV_PARAM_KBKDF_KEY_CHECK "kbkdf-key-check"
|
||||
# define OSSL_PROV_PARAM_KMAC_KEY_CHECK "kmac-key-check"
|
||||
# define OSSL_PROV_PARAM_NAME "name"
|
||||
# define OSSL_PROV_PARAM_NO_SHORT_MAC "no-short-mac"
|
||||
# define OSSL_PROV_PARAM_PBKDF2_LOWER_BOUND_CHECK "pbkdf2-lower-bound-check"
|
||||
# define OSSL_PROV_PARAM_RSA_PKCS15_PAD_DISABLED "rsa-pkcs15-pad-disabled"
|
||||
# define OSSL_PROV_PARAM_RSA_PSS_SALTLEN_CHECK "rsa-pss-saltlen-check"
|
||||
# define OSSL_PROV_PARAM_RSA_SIGN_X931_PAD_DISABLED "rsa-sign-x931-pad-disabled"
|
||||
# define OSSL_PROV_PARAM_SECURITY_CHECKS "security-checks"
|
||||
# define OSSL_PROV_PARAM_SELF_TEST_DESC "st-desc"
|
||||
# define OSSL_PROV_PARAM_SELF_TEST_PHASE "st-phase"
|
||||
# define OSSL_PROV_PARAM_SELF_TEST_TYPE "st-type"
|
||||
# define OSSL_PROV_PARAM_SIGNATURE_DIGEST_CHECK "signature-digest-check"
|
||||
# define OSSL_PROV_PARAM_SSHKDF_DIGEST_CHECK "sshkdf-digest-check"
|
||||
# define OSSL_PROV_PARAM_SSHKDF_KEY_CHECK "sshkdf-key-check"
|
||||
# define OSSL_PROV_PARAM_SSKDF_DIGEST_CHECK "sskdf-digest-check"
|
||||
# define OSSL_PROV_PARAM_SSKDF_KEY_CHECK "sskdf-key-check"
|
||||
# define OSSL_PROV_PARAM_STATUS "status"
|
||||
# define OSSL_PROV_PARAM_TDES_ENCRYPT_DISABLED "tdes-encrypt-disabled"
|
||||
# define OSSL_PROV_PARAM_TLS13_KDF_DIGEST_CHECK "tls13-kdf-digest-check"
|
||||
# define OSSL_PROV_PARAM_TLS13_KDF_KEY_CHECK "tls13-kdf-key-check"
|
||||
# define OSSL_PROV_PARAM_TLS1_PRF_DIGEST_CHECK "tls1-prf-digest-check"
|
||||
# define OSSL_PROV_PARAM_TLS1_PRF_EMS_CHECK "tls1-prf-ems-check"
|
||||
# define OSSL_PROV_PARAM_TLS1_PRF_KEY_CHECK "tls1-prf-key-check"
|
||||
# define OSSL_PROV_PARAM_VERSION "version"
|
||||
# define OSSL_PROV_PARAM_X942KDF_KEY_CHECK "x942kdf-key-check"
|
||||
# define OSSL_PROV_PARAM_X963KDF_DIGEST_CHECK "x963kdf-digest-check"
|
||||
# define OSSL_PROV_PARAM_X963KDF_KEY_CHECK "x963kdf-key-check"
|
||||
# define OSSL_RAND_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
||||
# define OSSL_RAND_PARAM_GENERATE "generate"
|
||||
# define OSSL_RAND_PARAM_MAX_REQUEST "max_request"
|
||||
# define OSSL_RAND_PARAM_STATE "state"
|
||||
# define OSSL_RAND_PARAM_STRENGTH "strength"
|
||||
# define OSSL_RAND_PARAM_TEST_ENTROPY "test_entropy"
|
||||
# define OSSL_RAND_PARAM_TEST_NONCE "test_nonce"
|
||||
# define OSSL_SIGNATURE_PARAM_ADD_RANDOM "additional-random"
|
||||
# define OSSL_SIGNATURE_PARAM_ALGORITHM_ID OSSL_PKEY_PARAM_ALGORITHM_ID
|
||||
# define OSSL_SIGNATURE_PARAM_ALGORITHM_ID_PARAMS OSSL_PKEY_PARAM_ALGORITHM_ID_PARAMS
|
||||
# define OSSL_SIGNATURE_PARAM_CONTEXT_STRING "context-string"
|
||||
# define OSSL_SIGNATURE_PARAM_DETERMINISTIC "deterministic"
|
||||
# define OSSL_SIGNATURE_PARAM_DIGEST OSSL_PKEY_PARAM_DIGEST
|
||||
# define OSSL_SIGNATURE_PARAM_DIGEST_SIZE OSSL_PKEY_PARAM_DIGEST_SIZE
|
||||
# define OSSL_SIGNATURE_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
||||
# define OSSL_SIGNATURE_PARAM_FIPS_DIGEST_CHECK OSSL_PKEY_PARAM_FIPS_DIGEST_CHECK
|
||||
# define OSSL_SIGNATURE_PARAM_FIPS_KEY_CHECK OSSL_PKEY_PARAM_FIPS_KEY_CHECK
|
||||
# define OSSL_SIGNATURE_PARAM_FIPS_RSA_PSS_SALTLEN_CHECK "rsa-pss-saltlen-check"
|
||||
# define OSSL_SIGNATURE_PARAM_FIPS_SIGN_CHECK OSSL_PKEY_PARAM_FIPS_SIGN_CHECK
|
||||
# define OSSL_SIGNATURE_PARAM_FIPS_SIGN_X931_PAD_CHECK "sign-x931-pad-check"
|
||||
# define OSSL_SIGNATURE_PARAM_FIPS_VERIFY_MESSAGE "verify-message"
|
||||
# define OSSL_SIGNATURE_PARAM_INSTANCE "instance"
|
||||
# define OSSL_SIGNATURE_PARAM_KAT "kat"
|
||||
# define OSSL_SIGNATURE_PARAM_MESSAGE_ENCODING "message-encoding"
|
||||
# define OSSL_SIGNATURE_PARAM_MGF1_DIGEST OSSL_PKEY_PARAM_MGF1_DIGEST
|
||||
# define OSSL_SIGNATURE_PARAM_MGF1_PROPERTIES OSSL_PKEY_PARAM_MGF1_PROPERTIES
|
||||
# define OSSL_SIGNATURE_PARAM_MU "mu"
|
||||
# define OSSL_SIGNATURE_PARAM_NONCE_TYPE "nonce-type"
|
||||
# define OSSL_SIGNATURE_PARAM_PAD_MODE OSSL_PKEY_PARAM_PAD_MODE
|
||||
# define OSSL_SIGNATURE_PARAM_PROPERTIES OSSL_PKEY_PARAM_PROPERTIES
|
||||
# define OSSL_SIGNATURE_PARAM_PSS_SALTLEN "saltlen"
|
||||
# define OSSL_SIGNATURE_PARAM_SIGNATURE "signature"
|
||||
# define OSSL_SIGNATURE_PARAM_TEST_ENTROPY "test-entropy"
|
||||
# define OSSL_SIGNATURE_PARAM_TLS_VERSION "tls-version"
|
||||
# define OSSL_SKEY_PARAM_KEY_LENGTH "key-length"
|
||||
# define OSSL_SKEY_PARAM_RAW_BYTES "raw-bytes"
|
||||
# define OSSL_STORE_PARAM_ALIAS "alias"
|
||||
# define OSSL_STORE_PARAM_DIGEST "digest"
|
||||
# define OSSL_STORE_PARAM_EXPECT "expect"
|
||||
# define OSSL_STORE_PARAM_FINGERPRINT "fingerprint"
|
||||
# define OSSL_STORE_PARAM_INPUT_TYPE "input-type"
|
||||
# define OSSL_STORE_PARAM_ISSUER "name"
|
||||
# define OSSL_STORE_PARAM_PROPERTIES "properties"
|
||||
# define OSSL_STORE_PARAM_SERIAL "serial"
|
||||
# define OSSL_STORE_PARAM_SUBJECT "subject"
|
||||
/* clang-format on */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* 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
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#ifndef OPENSSL_CORE_OBJECT_H
|
||||
#define OPENSSL_CORE_OBJECT_H
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*-
|
||||
* Known object types
|
||||
*
|
||||
* These numbers are used as values for the OSSL_PARAM parameter
|
||||
* OSSL_OBJECT_PARAM_TYPE.
|
||||
*
|
||||
* For most of these types, there's a corresponding libcrypto object type.
|
||||
* The corresponding type is indicated with a comment after the number.
|
||||
*/
|
||||
#define OSSL_OBJECT_UNKNOWN 0
|
||||
#define OSSL_OBJECT_NAME 1 /* char * */
|
||||
#define OSSL_OBJECT_PKEY 2 /* EVP_PKEY * */
|
||||
#define OSSL_OBJECT_CERT 3 /* X509 * */
|
||||
#define OSSL_OBJECT_CRL 4 /* X509_CRL * */
|
||||
#define OSSL_OBJECT_SKEY 5 /* EVP_SKEY * */
|
||||
|
||||
/*
|
||||
* The rest of the associated OSSL_PARAM elements is described in core_names.h
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -2,7 +2,7 @@
|
||||
* WARNING: do not edit!
|
||||
* Generated by Makefile from include/openssl/crmf.h.in
|
||||
*
|
||||
* Copyright 2007-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 2007-2026 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright Nokia 2007-2019
|
||||
* Copyright Siemens AG 2015-2019
|
||||
*
|
||||
@@ -14,47 +14,54 @@
|
||||
* CRMF (RFC 4211) implementation by M. Peylo, M. Viljanen, and D. von Oheimb.
|
||||
*/
|
||||
|
||||
/* clang-format off */
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
#ifndef OPENSSL_CRMF_H
|
||||
# define OPENSSL_CRMF_H
|
||||
#define OPENSSL_CRMF_H
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
#include <openssl/opensslconf.h>
|
||||
|
||||
# ifndef OPENSSL_NO_CRMF
|
||||
# include <openssl/opensslv.h>
|
||||
# include <openssl/safestack.h>
|
||||
# include <openssl/crmferr.h>
|
||||
# include <openssl/x509v3.h> /* for GENERAL_NAME etc. */
|
||||
#ifndef OPENSSL_NO_CRMF
|
||||
#include <openssl/opensslv.h>
|
||||
#include <openssl/safestack.h>
|
||||
#include <openssl/crmferr.h>
|
||||
#include <openssl/x509v3.h> /* for GENERAL_NAME etc. */
|
||||
#include <openssl/cms.h>
|
||||
|
||||
/* explicit #includes not strictly needed since implied by the above: */
|
||||
# include <openssl/types.h>
|
||||
# include <openssl/x509.h>
|
||||
#include <openssl/types.h>
|
||||
#include <openssl/x509.h>
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# define OSSL_CRMF_POPOPRIVKEY_THISMESSAGE 0
|
||||
# define OSSL_CRMF_POPOPRIVKEY_SUBSEQUENTMESSAGE 1
|
||||
# define OSSL_CRMF_POPOPRIVKEY_DHMAC 2
|
||||
# define OSSL_CRMF_POPOPRIVKEY_AGREEMAC 3
|
||||
# define OSSL_CRMF_POPOPRIVKEY_ENCRYPTEDKEY 4
|
||||
|
||||
# define OSSL_CRMF_SUBSEQUENTMESSAGE_ENCRCERT 0
|
||||
# define OSSL_CRMF_SUBSEQUENTMESSAGE_CHALLENGERESP 1
|
||||
#define OSSL_CRMF_POPOPRIVKEY_THISMESSAGE 0
|
||||
#define OSSL_CRMF_POPOPRIVKEY_SUBSEQUENTMESSAGE 1
|
||||
#define OSSL_CRMF_POPOPRIVKEY_DHMAC 2
|
||||
#define OSSL_CRMF_POPOPRIVKEY_AGREEMAC 3
|
||||
#define OSSL_CRMF_POPOPRIVKEY_ENCRYPTEDKEY 4
|
||||
|
||||
#define OSSL_CRMF_SUBSEQUENTMESSAGE_ENCRCERT 0
|
||||
#define OSSL_CRMF_SUBSEQUENTMESSAGE_CHALLENGERESP 1
|
||||
typedef struct ossl_crmf_encryptedvalue_st OSSL_CRMF_ENCRYPTEDVALUE;
|
||||
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_ENCRYPTEDVALUE)
|
||||
|
||||
typedef struct ossl_crmf_encryptedkey_st OSSL_CRMF_ENCRYPTEDKEY;
|
||||
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_ENCRYPTEDKEY)
|
||||
|
||||
typedef struct ossl_crmf_msg_st OSSL_CRMF_MSG;
|
||||
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_MSG)
|
||||
DECLARE_ASN1_DUP_FUNCTION(OSSL_CRMF_MSG)
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CRMF_MSG, OSSL_CRMF_MSG, OSSL_CRMF_MSG)
|
||||
#define sk_OSSL_CRMF_MSG_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CRMF_MSG_sk_type(sk))
|
||||
#define sk_OSSL_CRMF_MSG_value(sk, idx) ((OSSL_CRMF_MSG *)OPENSSL_sk_value(ossl_check_const_OSSL_CRMF_MSG_sk_type(sk), (idx)))
|
||||
#define sk_OSSL_CRMF_MSG_new(cmp) ((STACK_OF(OSSL_CRMF_MSG) *)OPENSSL_sk_new(ossl_check_OSSL_CRMF_MSG_compfunc_type(cmp)))
|
||||
#define sk_OSSL_CRMF_MSG_new_null() ((STACK_OF(OSSL_CRMF_MSG) *)OPENSSL_sk_new_null())
|
||||
#define sk_OSSL_CRMF_MSG_new_reserve(cmp, n) ((STACK_OF(OSSL_CRMF_MSG) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CRMF_MSG_compfunc_type(cmp), (n)))
|
||||
#define sk_OSSL_CRMF_MSG_new(cmp) ((STACK_OF(OSSL_CRMF_MSG) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new(ossl_check_OSSL_CRMF_MSG_compfunc_type(cmp)), sk_OSSL_CRMF_MSG_cmpfunc_thunk))
|
||||
#define sk_OSSL_CRMF_MSG_new_null() ((STACK_OF(OSSL_CRMF_MSG) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_OSSL_CRMF_MSG_freefunc_thunk))
|
||||
#define sk_OSSL_CRMF_MSG_new_reserve(cmp, n) ((STACK_OF(OSSL_CRMF_MSG) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new_reserve(ossl_check_OSSL_CRMF_MSG_compfunc_type(cmp), (n)), sk_OSSL_CRMF_MSG_cmpfunc_thunk))
|
||||
#define sk_OSSL_CRMF_MSG_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CRMF_MSG_sk_type(sk), (n))
|
||||
#define sk_OSSL_CRMF_MSG_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CRMF_MSG_sk_type(sk))
|
||||
#define sk_OSSL_CRMF_MSG_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CRMF_MSG_sk_type(sk))
|
||||
@@ -64,7 +71,7 @@ SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CRMF_MSG, OSSL_CRMF_MSG, OSSL_CRMF_MSG)
|
||||
#define sk_OSSL_CRMF_MSG_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CRMF_MSG_sk_type(sk), ossl_check_OSSL_CRMF_MSG_type(ptr))
|
||||
#define sk_OSSL_CRMF_MSG_pop(sk) ((OSSL_CRMF_MSG *)OPENSSL_sk_pop(ossl_check_OSSL_CRMF_MSG_sk_type(sk)))
|
||||
#define sk_OSSL_CRMF_MSG_shift(sk) ((OSSL_CRMF_MSG *)OPENSSL_sk_shift(ossl_check_OSSL_CRMF_MSG_sk_type(sk)))
|
||||
#define sk_OSSL_CRMF_MSG_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CRMF_MSG_sk_type(sk),ossl_check_OSSL_CRMF_MSG_freefunc_type(freefunc))
|
||||
#define sk_OSSL_CRMF_MSG_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CRMF_MSG_sk_type(sk), ossl_check_OSSL_CRMF_MSG_freefunc_type(freefunc))
|
||||
#define sk_OSSL_CRMF_MSG_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CRMF_MSG_sk_type(sk), ossl_check_OSSL_CRMF_MSG_type(ptr), (idx))
|
||||
#define sk_OSSL_CRMF_MSG_set(sk, idx, ptr) ((OSSL_CRMF_MSG *)OPENSSL_sk_set(ossl_check_OSSL_CRMF_MSG_sk_type(sk), (idx), ossl_check_OSSL_CRMF_MSG_type(ptr)))
|
||||
#define sk_OSSL_CRMF_MSG_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CRMF_MSG_sk_type(sk), ossl_check_OSSL_CRMF_MSG_type(ptr))
|
||||
@@ -76,7 +83,40 @@ SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CRMF_MSG, OSSL_CRMF_MSG, OSSL_CRMF_MSG)
|
||||
#define sk_OSSL_CRMF_MSG_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CRMF_MSG) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CRMF_MSG_sk_type(sk), ossl_check_OSSL_CRMF_MSG_copyfunc_type(copyfunc), ossl_check_OSSL_CRMF_MSG_freefunc_type(freefunc)))
|
||||
#define sk_OSSL_CRMF_MSG_set_cmp_func(sk, cmp) ((sk_OSSL_CRMF_MSG_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CRMF_MSG_sk_type(sk), ossl_check_OSSL_CRMF_MSG_compfunc_type(cmp)))
|
||||
|
||||
/* clang-format on */
|
||||
typedef struct ossl_crmf_attributetypeandvalue_st OSSL_CRMF_ATTRIBUTETYPEANDVALUE;
|
||||
void OSSL_CRMF_ATTRIBUTETYPEANDVALUE_free(OSSL_CRMF_ATTRIBUTETYPEANDVALUE *v);
|
||||
DECLARE_ASN1_DUP_FUNCTION(OSSL_CRMF_ATTRIBUTETYPEANDVALUE)
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CRMF_ATTRIBUTETYPEANDVALUE, OSSL_CRMF_ATTRIBUTETYPEANDVALUE, OSSL_CRMF_ATTRIBUTETYPEANDVALUE)
|
||||
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk))
|
||||
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_value(sk, idx) ((OSSL_CRMF_ATTRIBUTETYPEANDVALUE *)OPENSSL_sk_value(ossl_check_const_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), (idx)))
|
||||
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_new(cmp) ((STACK_OF(OSSL_CRMF_ATTRIBUTETYPEANDVALUE) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_compfunc_type(cmp)), sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_cmpfunc_thunk))
|
||||
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_new_null() ((STACK_OF(OSSL_CRMF_ATTRIBUTETYPEANDVALUE) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_freefunc_thunk))
|
||||
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_new_reserve(cmp, n) ((STACK_OF(OSSL_CRMF_ATTRIBUTETYPEANDVALUE) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new_reserve(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_compfunc_type(cmp), (n)), sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_cmpfunc_thunk))
|
||||
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), (n))
|
||||
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk))
|
||||
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk))
|
||||
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_delete(sk, i) ((OSSL_CRMF_ATTRIBUTETYPEANDVALUE *)OPENSSL_sk_delete(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), (i)))
|
||||
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_delete_ptr(sk, ptr) ((OSSL_CRMF_ATTRIBUTETYPEANDVALUE *)OPENSSL_sk_delete_ptr(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_type(ptr)))
|
||||
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_push(sk, ptr) OPENSSL_sk_push(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_type(ptr))
|
||||
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_type(ptr))
|
||||
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_pop(sk) ((OSSL_CRMF_ATTRIBUTETYPEANDVALUE *)OPENSSL_sk_pop(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk)))
|
||||
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_shift(sk) ((OSSL_CRMF_ATTRIBUTETYPEANDVALUE *)OPENSSL_sk_shift(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk)))
|
||||
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_freefunc_type(freefunc))
|
||||
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_type(ptr), (idx))
|
||||
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_set(sk, idx, ptr) ((OSSL_CRMF_ATTRIBUTETYPEANDVALUE *)OPENSSL_sk_set(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), (idx), ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_type(ptr)))
|
||||
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_type(ptr))
|
||||
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_type(ptr))
|
||||
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_type(ptr), pnum)
|
||||
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk))
|
||||
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk))
|
||||
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_dup(sk) ((STACK_OF(OSSL_CRMF_ATTRIBUTETYPEANDVALUE) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk)))
|
||||
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CRMF_ATTRIBUTETYPEANDVALUE) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_copyfunc_type(copyfunc), ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_freefunc_type(freefunc)))
|
||||
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_set_cmp_func(sk, cmp) ((sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_compfunc_type(cmp)))
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
typedef struct ossl_crmf_pbmparameter_st OSSL_CRMF_PBMPARAMETER;
|
||||
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_PBMPARAMETER)
|
||||
typedef struct ossl_crmf_poposigningkey_st OSSL_CRMF_POPOSIGNINGKEY;
|
||||
@@ -84,12 +124,13 @@ typedef struct ossl_crmf_certrequest_st OSSL_CRMF_CERTREQUEST;
|
||||
typedef struct ossl_crmf_certid_st OSSL_CRMF_CERTID;
|
||||
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_CERTID)
|
||||
DECLARE_ASN1_DUP_FUNCTION(OSSL_CRMF_CERTID)
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CRMF_CERTID, OSSL_CRMF_CERTID, OSSL_CRMF_CERTID)
|
||||
#define sk_OSSL_CRMF_CERTID_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CRMF_CERTID_sk_type(sk))
|
||||
#define sk_OSSL_CRMF_CERTID_value(sk, idx) ((OSSL_CRMF_CERTID *)OPENSSL_sk_value(ossl_check_const_OSSL_CRMF_CERTID_sk_type(sk), (idx)))
|
||||
#define sk_OSSL_CRMF_CERTID_new(cmp) ((STACK_OF(OSSL_CRMF_CERTID) *)OPENSSL_sk_new(ossl_check_OSSL_CRMF_CERTID_compfunc_type(cmp)))
|
||||
#define sk_OSSL_CRMF_CERTID_new_null() ((STACK_OF(OSSL_CRMF_CERTID) *)OPENSSL_sk_new_null())
|
||||
#define sk_OSSL_CRMF_CERTID_new_reserve(cmp, n) ((STACK_OF(OSSL_CRMF_CERTID) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CRMF_CERTID_compfunc_type(cmp), (n)))
|
||||
#define sk_OSSL_CRMF_CERTID_new(cmp) ((STACK_OF(OSSL_CRMF_CERTID) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new(ossl_check_OSSL_CRMF_CERTID_compfunc_type(cmp)), sk_OSSL_CRMF_CERTID_cmpfunc_thunk))
|
||||
#define sk_OSSL_CRMF_CERTID_new_null() ((STACK_OF(OSSL_CRMF_CERTID) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_OSSL_CRMF_CERTID_freefunc_thunk))
|
||||
#define sk_OSSL_CRMF_CERTID_new_reserve(cmp, n) ((STACK_OF(OSSL_CRMF_CERTID) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new_reserve(ossl_check_OSSL_CRMF_CERTID_compfunc_type(cmp), (n)), sk_OSSL_CRMF_CERTID_cmpfunc_thunk))
|
||||
#define sk_OSSL_CRMF_CERTID_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), (n))
|
||||
#define sk_OSSL_CRMF_CERTID_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CRMF_CERTID_sk_type(sk))
|
||||
#define sk_OSSL_CRMF_CERTID_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CRMF_CERTID_sk_type(sk))
|
||||
@@ -99,7 +140,7 @@ SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CRMF_CERTID, OSSL_CRMF_CERTID, OSSL_CRMF_CERTI
|
||||
#define sk_OSSL_CRMF_CERTID_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), ossl_check_OSSL_CRMF_CERTID_type(ptr))
|
||||
#define sk_OSSL_CRMF_CERTID_pop(sk) ((OSSL_CRMF_CERTID *)OPENSSL_sk_pop(ossl_check_OSSL_CRMF_CERTID_sk_type(sk)))
|
||||
#define sk_OSSL_CRMF_CERTID_shift(sk) ((OSSL_CRMF_CERTID *)OPENSSL_sk_shift(ossl_check_OSSL_CRMF_CERTID_sk_type(sk)))
|
||||
#define sk_OSSL_CRMF_CERTID_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CRMF_CERTID_sk_type(sk),ossl_check_OSSL_CRMF_CERTID_freefunc_type(freefunc))
|
||||
#define sk_OSSL_CRMF_CERTID_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), ossl_check_OSSL_CRMF_CERTID_freefunc_type(freefunc))
|
||||
#define sk_OSSL_CRMF_CERTID_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), ossl_check_OSSL_CRMF_CERTID_type(ptr), (idx))
|
||||
#define sk_OSSL_CRMF_CERTID_set(sk, idx, ptr) ((OSSL_CRMF_CERTID *)OPENSSL_sk_set(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), (idx), ossl_check_OSSL_CRMF_CERTID_type(ptr)))
|
||||
#define sk_OSSL_CRMF_CERTID_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), ossl_check_OSSL_CRMF_CERTID_type(ptr))
|
||||
@@ -111,6 +152,7 @@ SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CRMF_CERTID, OSSL_CRMF_CERTID, OSSL_CRMF_CERTI
|
||||
#define sk_OSSL_CRMF_CERTID_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CRMF_CERTID) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CRMF_CERTID_sk_type(sk), ossl_check_OSSL_CRMF_CERTID_copyfunc_type(copyfunc), ossl_check_OSSL_CRMF_CERTID_freefunc_type(freefunc)))
|
||||
#define sk_OSSL_CRMF_CERTID_set_cmp_func(sk, cmp) ((sk_OSSL_CRMF_CERTID_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), ossl_check_OSSL_CRMF_CERTID_compfunc_type(cmp)))
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
typedef struct ossl_crmf_pkipublicationinfo_st OSSL_CRMF_PKIPUBLICATIONINFO;
|
||||
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_PKIPUBLICATIONINFO)
|
||||
@@ -118,6 +160,7 @@ typedef struct ossl_crmf_singlepubinfo_st OSSL_CRMF_SINGLEPUBINFO;
|
||||
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_SINGLEPUBINFO)
|
||||
typedef struct ossl_crmf_certtemplate_st OSSL_CRMF_CERTTEMPLATE;
|
||||
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_CERTTEMPLATE)
|
||||
DECLARE_ASN1_DUP_FUNCTION(OSSL_CRMF_CERTTEMPLATE)
|
||||
typedef STACK_OF(OSSL_CRMF_MSG) OSSL_CRMF_MSGS;
|
||||
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_MSGS)
|
||||
|
||||
@@ -125,103 +168,112 @@ typedef struct ossl_crmf_optionalvalidity_st OSSL_CRMF_OPTIONALVALIDITY;
|
||||
|
||||
/* crmf_pbm.c */
|
||||
OSSL_CRMF_PBMPARAMETER *OSSL_CRMF_pbmp_new(OSSL_LIB_CTX *libctx, size_t slen,
|
||||
int owfnid, size_t itercnt,
|
||||
int macnid);
|
||||
int owfnid, size_t itercnt,
|
||||
int macnid);
|
||||
int OSSL_CRMF_pbm_new(OSSL_LIB_CTX *libctx, const char *propq,
|
||||
const OSSL_CRMF_PBMPARAMETER *pbmp,
|
||||
const unsigned char *msg, size_t msglen,
|
||||
const unsigned char *sec, size_t seclen,
|
||||
unsigned char **mac, size_t *maclen);
|
||||
const OSSL_CRMF_PBMPARAMETER *pbmp,
|
||||
const unsigned char *msg, size_t msglen,
|
||||
const unsigned char *sec, size_t seclen,
|
||||
unsigned char **mac, size_t *maclen);
|
||||
|
||||
/* crmf_lib.c */
|
||||
int OSSL_CRMF_MSG_set1_regCtrl_regToken(OSSL_CRMF_MSG *msg,
|
||||
const ASN1_UTF8STRING *tok);
|
||||
const ASN1_UTF8STRING *tok);
|
||||
ASN1_UTF8STRING
|
||||
*OSSL_CRMF_MSG_get0_regCtrl_regToken(const OSSL_CRMF_MSG *msg);
|
||||
int OSSL_CRMF_MSG_set1_regCtrl_authenticator(OSSL_CRMF_MSG *msg,
|
||||
const ASN1_UTF8STRING *auth);
|
||||
const ASN1_UTF8STRING *auth);
|
||||
ASN1_UTF8STRING
|
||||
*OSSL_CRMF_MSG_get0_regCtrl_authenticator(const OSSL_CRMF_MSG *msg);
|
||||
int
|
||||
OSSL_CRMF_MSG_PKIPublicationInfo_push0_SinglePubInfo(OSSL_CRMF_PKIPUBLICATIONINFO *pi,
|
||||
OSSL_CRMF_SINGLEPUBINFO *spi);
|
||||
# define OSSL_CRMF_PUB_METHOD_DONTCARE 0
|
||||
# define OSSL_CRMF_PUB_METHOD_X500 1
|
||||
# define OSSL_CRMF_PUB_METHOD_WEB 2
|
||||
# define OSSL_CRMF_PUB_METHOD_LDAP 3
|
||||
int OSSL_CRMF_MSG_PKIPublicationInfo_push0_SinglePubInfo(OSSL_CRMF_PKIPUBLICATIONINFO *pi,
|
||||
OSSL_CRMF_SINGLEPUBINFO *spi);
|
||||
#define OSSL_CRMF_PUB_METHOD_DONTCARE 0
|
||||
#define OSSL_CRMF_PUB_METHOD_X500 1
|
||||
#define OSSL_CRMF_PUB_METHOD_WEB 2
|
||||
#define OSSL_CRMF_PUB_METHOD_LDAP 3
|
||||
int OSSL_CRMF_MSG_set0_SinglePubInfo(OSSL_CRMF_SINGLEPUBINFO *spi,
|
||||
int method, GENERAL_NAME *nm);
|
||||
# define OSSL_CRMF_PUB_ACTION_DONTPUBLISH 0
|
||||
# define OSSL_CRMF_PUB_ACTION_PLEASEPUBLISH 1
|
||||
int method, GENERAL_NAME *nm);
|
||||
#define OSSL_CRMF_PUB_ACTION_DONTPUBLISH 0
|
||||
#define OSSL_CRMF_PUB_ACTION_PLEASEPUBLISH 1
|
||||
int OSSL_CRMF_MSG_set_PKIPublicationInfo_action(OSSL_CRMF_PKIPUBLICATIONINFO *pi,
|
||||
int action);
|
||||
int action);
|
||||
int OSSL_CRMF_MSG_set1_regCtrl_pkiPublicationInfo(OSSL_CRMF_MSG *msg,
|
||||
const OSSL_CRMF_PKIPUBLICATIONINFO *pi);
|
||||
const OSSL_CRMF_PKIPUBLICATIONINFO *pi);
|
||||
OSSL_CRMF_PKIPUBLICATIONINFO
|
||||
*OSSL_CRMF_MSG_get0_regCtrl_pkiPublicationInfo(const OSSL_CRMF_MSG *msg);
|
||||
int OSSL_CRMF_MSG_set1_regCtrl_protocolEncrKey(OSSL_CRMF_MSG *msg,
|
||||
const X509_PUBKEY *pubkey);
|
||||
const X509_PUBKEY *pubkey);
|
||||
X509_PUBKEY
|
||||
*OSSL_CRMF_MSG_get0_regCtrl_protocolEncrKey(const OSSL_CRMF_MSG *msg);
|
||||
int OSSL_CRMF_MSG_set1_regCtrl_oldCertID(OSSL_CRMF_MSG *msg,
|
||||
const OSSL_CRMF_CERTID *cid);
|
||||
const OSSL_CRMF_CERTID *cid);
|
||||
OSSL_CRMF_CERTID
|
||||
*OSSL_CRMF_MSG_get0_regCtrl_oldCertID(const OSSL_CRMF_MSG *msg);
|
||||
OSSL_CRMF_CERTID *OSSL_CRMF_CERTID_gen(const X509_NAME *issuer,
|
||||
const ASN1_INTEGER *serial);
|
||||
const ASN1_INTEGER *serial);
|
||||
|
||||
int OSSL_CRMF_MSG_set1_regInfo_utf8Pairs(OSSL_CRMF_MSG *msg,
|
||||
const ASN1_UTF8STRING *utf8pairs);
|
||||
const ASN1_UTF8STRING *utf8pairs);
|
||||
ASN1_UTF8STRING
|
||||
*OSSL_CRMF_MSG_get0_regInfo_utf8Pairs(const OSSL_CRMF_MSG *msg);
|
||||
int OSSL_CRMF_MSG_set1_regInfo_certReq(OSSL_CRMF_MSG *msg,
|
||||
const OSSL_CRMF_CERTREQUEST *cr);
|
||||
const OSSL_CRMF_CERTREQUEST *cr);
|
||||
OSSL_CRMF_CERTREQUEST
|
||||
*OSSL_CRMF_MSG_get0_regInfo_certReq(const OSSL_CRMF_MSG *msg);
|
||||
|
||||
int OSSL_CRMF_MSG_set0_validity(OSSL_CRMF_MSG *crm,
|
||||
ASN1_TIME *notBefore, ASN1_TIME *notAfter);
|
||||
ASN1_TIME *notBefore, ASN1_TIME *notAfter);
|
||||
int OSSL_CRMF_MSG_set_certReqId(OSSL_CRMF_MSG *crm, int rid);
|
||||
int OSSL_CRMF_MSG_get_certReqId(const OSSL_CRMF_MSG *crm);
|
||||
int OSSL_CRMF_MSG_set0_extensions(OSSL_CRMF_MSG *crm, X509_EXTENSIONS *exts);
|
||||
|
||||
int OSSL_CRMF_MSG_push0_extension(OSSL_CRMF_MSG *crm, X509_EXTENSION *ext);
|
||||
# define OSSL_CRMF_POPO_NONE -1
|
||||
# define OSSL_CRMF_POPO_RAVERIFIED 0
|
||||
# define OSSL_CRMF_POPO_SIGNATURE 1
|
||||
# define OSSL_CRMF_POPO_KEYENC 2
|
||||
# define OSSL_CRMF_POPO_KEYAGREE 3
|
||||
#define OSSL_CRMF_POPO_NONE -1
|
||||
#define OSSL_CRMF_POPO_RAVERIFIED 0
|
||||
#define OSSL_CRMF_POPO_SIGNATURE 1
|
||||
#define OSSL_CRMF_POPO_KEYENC 2
|
||||
#define OSSL_CRMF_POPO_KEYAGREE 3
|
||||
int OSSL_CRMF_MSG_create_popo(int meth, OSSL_CRMF_MSG *crm,
|
||||
EVP_PKEY *pkey, const EVP_MD *digest,
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
EVP_PKEY *pkey, const EVP_MD *digest,
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
int OSSL_CRMF_MSGS_verify_popo(const OSSL_CRMF_MSGS *reqs,
|
||||
int rid, int acceptRAVerified,
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
int rid, int acceptRAVerified,
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
OSSL_CRMF_CERTTEMPLATE *OSSL_CRMF_MSG_get0_tmpl(const OSSL_CRMF_MSG *crm);
|
||||
const ASN1_INTEGER
|
||||
*OSSL_CRMF_CERTTEMPLATE_get0_serialNumber(const OSSL_CRMF_CERTTEMPLATE *tmpl);
|
||||
const X509_NAME
|
||||
*OSSL_CRMF_CERTTEMPLATE_get0_subject(const OSSL_CRMF_CERTTEMPLATE *tmpl);
|
||||
const X509_NAME
|
||||
*OSSL_CRMF_CERTTEMPLATE_get0_issuer(const OSSL_CRMF_CERTTEMPLATE *tmpl);
|
||||
X509_PUBKEY
|
||||
*OSSL_CRMF_CERTTEMPLATE_get0_publicKey(const OSSL_CRMF_CERTTEMPLATE *tmpl);
|
||||
const X509_NAME *OSSL_CRMF_CERTTEMPLATE_get0_subject(const OSSL_CRMF_CERTTEMPLATE *tmpl);
|
||||
const X509_NAME *OSSL_CRMF_CERTTEMPLATE_get0_issuer(const OSSL_CRMF_CERTTEMPLATE *tmpl);
|
||||
const ASN1_INTEGER *OSSL_CRMF_CERTTEMPLATE_get0_serialNumber(const OSSL_CRMF_CERTTEMPLATE *tmpl);
|
||||
X509_EXTENSIONS
|
||||
*OSSL_CRMF_CERTTEMPLATE_get0_extensions(const OSSL_CRMF_CERTTEMPLATE *tmpl);
|
||||
const X509_NAME
|
||||
*OSSL_CRMF_CERTID_get0_issuer(const OSSL_CRMF_CERTID *cid);
|
||||
const ASN1_INTEGER
|
||||
*OSSL_CRMF_CERTID_get0_serialNumber(const OSSL_CRMF_CERTID *cid);
|
||||
const X509_NAME *OSSL_CRMF_CERTID_get0_issuer(const OSSL_CRMF_CERTID *cid);
|
||||
const ASN1_INTEGER *OSSL_CRMF_CERTID_get0_serialNumber(const OSSL_CRMF_CERTID *cid);
|
||||
int OSSL_CRMF_CERTTEMPLATE_fill(OSSL_CRMF_CERTTEMPLATE *tmpl,
|
||||
EVP_PKEY *pubkey,
|
||||
const X509_NAME *subject,
|
||||
const X509_NAME *issuer,
|
||||
const ASN1_INTEGER *serial);
|
||||
X509
|
||||
*OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert(const OSSL_CRMF_ENCRYPTEDVALUE *ecert,
|
||||
OSSL_LIB_CTX *libctx, const char *propq,
|
||||
EVP_PKEY *pkey);
|
||||
EVP_PKEY *pubkey,
|
||||
const X509_NAME *subject,
|
||||
const X509_NAME *issuer,
|
||||
const ASN1_INTEGER *serial);
|
||||
X509 *OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert(const OSSL_CRMF_ENCRYPTEDVALUE *ecert,
|
||||
OSSL_LIB_CTX *libctx, const char *propq,
|
||||
EVP_PKEY *pkey);
|
||||
X509 *OSSL_CRMF_ENCRYPTEDKEY_get1_encCert(const OSSL_CRMF_ENCRYPTEDKEY *ecert,
|
||||
OSSL_LIB_CTX *libctx, const char *propq,
|
||||
EVP_PKEY *pkey, unsigned int flags);
|
||||
unsigned char *OSSL_CRMF_ENCRYPTEDVALUE_decrypt(const OSSL_CRMF_ENCRYPTEDVALUE *enc,
|
||||
OSSL_LIB_CTX *libctx, const char *propq,
|
||||
EVP_PKEY *pkey, int *outlen);
|
||||
EVP_PKEY *OSSL_CRMF_ENCRYPTEDKEY_get1_pkey(const OSSL_CRMF_ENCRYPTEDKEY *encryptedKey,
|
||||
X509_STORE *ts, STACK_OF(X509) *extra, EVP_PKEY *pkey,
|
||||
X509 *cert, ASN1_OCTET_STRING *secret,
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
int OSSL_CRMF_MSG_centralkeygen_requested(const OSSL_CRMF_MSG *crm, const X509_REQ *p10);
|
||||
#ifndef OPENSSL_NO_CMS
|
||||
OSSL_CRMF_ENCRYPTEDKEY *OSSL_CRMF_ENCRYPTEDKEY_init_envdata(CMS_EnvelopedData *envdata);
|
||||
#endif
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
# endif /* !defined(OPENSSL_NO_CRMF) */
|
||||
#endif
|
||||
#endif /* !defined(OPENSSL_NO_CRMF) */
|
||||
#endif /* !defined(OPENSSL_CRMF_H) */
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* Generated by util/mkerr.pl DO NOT EDIT
|
||||
* Copyright 1995-2025 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* 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
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#ifndef OPENSSL_CRMFERR_H
|
||||
#define OPENSSL_CRMFERR_H
|
||||
#pragma once
|
||||
|
||||
#include <openssl/opensslconf.h>
|
||||
#include <openssl/symhacks.h>
|
||||
#include <openssl/cryptoerr_legacy.h>
|
||||
|
||||
#ifndef OPENSSL_NO_CRMF
|
||||
|
||||
/*
|
||||
* CRMF reason codes.
|
||||
*/
|
||||
#define CRMF_R_BAD_PBM_ITERATIONCOUNT 100
|
||||
#define CRMF_R_CMS_NOT_SUPPORTED 122
|
||||
#define CRMF_R_CRMFERROR 102
|
||||
#define CRMF_R_ERROR 103
|
||||
#define CRMF_R_ERROR_DECODING_CERTIFICATE 104
|
||||
#define CRMF_R_ERROR_DECODING_ENCRYPTEDKEY 123
|
||||
#define CRMF_R_ERROR_DECRYPTING_CERTIFICATE 105
|
||||
#define CRMF_R_ERROR_DECRYPTING_ENCRYPTEDKEY 124
|
||||
#define CRMF_R_ERROR_DECRYPTING_ENCRYPTEDVALUE 125
|
||||
#define CRMF_R_ERROR_DECRYPTING_SYMMETRIC_KEY 106
|
||||
#define CRMF_R_ERROR_SETTING_PURPOSE 126
|
||||
#define CRMF_R_ERROR_SIGNING_POPO 129
|
||||
#define CRMF_R_ERROR_VERIFYING_ENCRYPTEDKEY 127
|
||||
#define CRMF_R_FAILURE_OBTAINING_RANDOM 107
|
||||
#define CRMF_R_ITERATIONCOUNT_BELOW_100 108
|
||||
#define CRMF_R_MALFORMED_IV 101
|
||||
#define CRMF_R_NULL_ARGUMENT 109
|
||||
#define CRMF_R_POPOSKINPUT_NOT_SUPPORTED 113
|
||||
#define CRMF_R_POPO_INCONSISTENT_CENTRAL_KEYGEN 128
|
||||
#define CRMF_R_POPO_INCONSISTENT_PUBLIC_KEY 117
|
||||
#define CRMF_R_POPO_MISSING 121
|
||||
#define CRMF_R_POPO_MISSING_PUBLIC_KEY 118
|
||||
#define CRMF_R_POPO_MISSING_SUBJECT 119
|
||||
#define CRMF_R_POPO_RAVERIFIED_NOT_ACCEPTED 120
|
||||
#define CRMF_R_SETTING_MAC_ALGOR_FAILURE 110
|
||||
#define CRMF_R_SETTING_OWF_ALGOR_FAILURE 111
|
||||
#define CRMF_R_UNSUPPORTED_ALGORITHM 112
|
||||
#define CRMF_R_UNSUPPORTED_CIPHER 114
|
||||
#define CRMF_R_UNSUPPORTED_METHOD_FOR_CREATING_POPO 115
|
||||
#define CRMF_R_UNSUPPORTED_POPO_METHOD 116
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@@ -1,58 +1,72 @@
|
||||
/*
|
||||
* Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* WARNING: do not edit!
|
||||
* Generated by Makefile from include/openssl/crypto.h.in
|
||||
*
|
||||
* Copyright 1995-2026 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
|
||||
*
|
||||
* Licensed under the OpenSSL license (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
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#ifndef HEADER_CRYPTO_H
|
||||
# define HEADER_CRYPTO_H
|
||||
/* clang-format off */
|
||||
|
||||
# include <stdlib.h>
|
||||
# include <time.h>
|
||||
/* clang-format on */
|
||||
|
||||
# include <openssl/e_os2.h>
|
||||
#ifndef OPENSSL_CRYPTO_H
|
||||
#define OPENSSL_CRYPTO_H
|
||||
#pragma once
|
||||
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# endif
|
||||
#include <openssl/macros.h>
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#define HEADER_CRYPTO_H
|
||||
#endif
|
||||
|
||||
# include <openssl/safestack.h>
|
||||
# include <openssl/opensslv.h>
|
||||
# include <openssl/ossl_typ.h>
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/cryptoerr.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
|
||||
# ifdef CHARSET_EBCDIC
|
||||
# include <openssl/ebcdic.h>
|
||||
# endif
|
||||
#include <openssl/e_os2.h>
|
||||
|
||||
#ifndef OPENSSL_NO_STDIO
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#include <openssl/safestack.h>
|
||||
#include <openssl/opensslv.h>
|
||||
#include <openssl/types.h>
|
||||
#include <openssl/opensslconf.h>
|
||||
#include <openssl/cryptoerr.h>
|
||||
#include <openssl/core.h>
|
||||
|
||||
#ifdef CHARSET_EBCDIC
|
||||
#include <openssl/ebcdic.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Resolve problems on some operating systems with symbol names that clash
|
||||
* one way or another
|
||||
*/
|
||||
# include <openssl/symhacks.h>
|
||||
#include <openssl/symhacks.h>
|
||||
|
||||
# if OPENSSL_API_COMPAT < 0x10100000L
|
||||
# include <openssl/opensslv.h>
|
||||
# endif
|
||||
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
#include <openssl/opensslv.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
# if OPENSSL_API_COMPAT < 0x10100000L
|
||||
# define SSLeay OpenSSL_version_num
|
||||
# define SSLeay_version OpenSSL_version
|
||||
# define SSLEAY_VERSION_NUMBER OPENSSL_VERSION_NUMBER
|
||||
# define SSLEAY_VERSION OPENSSL_VERSION
|
||||
# define SSLEAY_CFLAGS OPENSSL_CFLAGS
|
||||
# define SSLEAY_BUILT_ON OPENSSL_BUILT_ON
|
||||
# define SSLEAY_PLATFORM OPENSSL_PLATFORM
|
||||
# define SSLEAY_DIR OPENSSL_DIR
|
||||
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
#define SSLeay OpenSSL_version_num
|
||||
#define SSLeay_version OpenSSL_version
|
||||
#define SSLEAY_VERSION_NUMBER OPENSSL_VERSION_NUMBER
|
||||
#define SSLEAY_VERSION OPENSSL_VERSION
|
||||
#define SSLEAY_CFLAGS OPENSSL_CFLAGS
|
||||
#define SSLEAY_BUILT_ON OPENSSL_BUILT_ON
|
||||
#define SSLEAY_PLATFORM OPENSSL_PLATFORM
|
||||
#define SSLEAY_DIR OPENSSL_DIR
|
||||
|
||||
/*
|
||||
* Old type for allocating dynamic locks. No longer used. Use the new thread
|
||||
@@ -62,116 +76,209 @@ typedef struct {
|
||||
int dummy;
|
||||
} CRYPTO_dynlock;
|
||||
|
||||
# endif /* OPENSSL_API_COMPAT */
|
||||
#endif /* OPENSSL_NO_DEPRECATED_1_1_0 */
|
||||
|
||||
typedef void CRYPTO_RWLOCK;
|
||||
|
||||
CRYPTO_RWLOCK *CRYPTO_THREAD_lock_new(void);
|
||||
int CRYPTO_THREAD_read_lock(CRYPTO_RWLOCK *lock);
|
||||
int CRYPTO_THREAD_write_lock(CRYPTO_RWLOCK *lock);
|
||||
__owur int CRYPTO_THREAD_read_lock(CRYPTO_RWLOCK *lock);
|
||||
__owur int CRYPTO_THREAD_write_lock(CRYPTO_RWLOCK *lock);
|
||||
int CRYPTO_THREAD_unlock(CRYPTO_RWLOCK *lock);
|
||||
void CRYPTO_THREAD_lock_free(CRYPTO_RWLOCK *lock);
|
||||
|
||||
int CRYPTO_atomic_add(int *val, int amount, int *ret, CRYPTO_RWLOCK *lock);
|
||||
|
||||
/*
|
||||
* The following can be used to detect memory leaks in the library. If
|
||||
* used, it turns on malloc checking
|
||||
*/
|
||||
# define CRYPTO_MEM_CHECK_OFF 0x0 /* Control only */
|
||||
# define CRYPTO_MEM_CHECK_ON 0x1 /* Control and mode bit */
|
||||
# define CRYPTO_MEM_CHECK_ENABLE 0x2 /* Control and mode bit */
|
||||
# define CRYPTO_MEM_CHECK_DISABLE 0x3 /* Control only */
|
||||
|
||||
struct crypto_ex_data_st {
|
||||
STACK_OF(void) *sk;
|
||||
};
|
||||
DEFINE_STACK_OF(void)
|
||||
|
||||
/*
|
||||
* Per class, we have a STACK of function pointers.
|
||||
*/
|
||||
# define CRYPTO_EX_INDEX_SSL 0
|
||||
# define CRYPTO_EX_INDEX_SSL_CTX 1
|
||||
# define CRYPTO_EX_INDEX_SSL_SESSION 2
|
||||
# define CRYPTO_EX_INDEX_X509 3
|
||||
# define CRYPTO_EX_INDEX_X509_STORE 4
|
||||
# define CRYPTO_EX_INDEX_X509_STORE_CTX 5
|
||||
# define CRYPTO_EX_INDEX_DH 6
|
||||
# define CRYPTO_EX_INDEX_DSA 7
|
||||
# define CRYPTO_EX_INDEX_EC_KEY 8
|
||||
# define CRYPTO_EX_INDEX_RSA 9
|
||||
# define CRYPTO_EX_INDEX_ENGINE 10
|
||||
# define CRYPTO_EX_INDEX_UI 11
|
||||
# define CRYPTO_EX_INDEX_BIO 12
|
||||
# define CRYPTO_EX_INDEX_APP 13
|
||||
# define CRYPTO_EX_INDEX_UI_METHOD 14
|
||||
# define CRYPTO_EX_INDEX_DRBG 15
|
||||
# define CRYPTO_EX_INDEX__COUNT 16
|
||||
int CRYPTO_atomic_add64(uint64_t *val, uint64_t op, uint64_t *ret,
|
||||
CRYPTO_RWLOCK *lock);
|
||||
int CRYPTO_atomic_and(uint64_t *val, uint64_t op, uint64_t *ret,
|
||||
CRYPTO_RWLOCK *lock);
|
||||
int CRYPTO_atomic_or(uint64_t *val, uint64_t op, uint64_t *ret,
|
||||
CRYPTO_RWLOCK *lock);
|
||||
int CRYPTO_atomic_load(uint64_t *val, uint64_t *ret, CRYPTO_RWLOCK *lock);
|
||||
int CRYPTO_atomic_load_int(int *val, int *ret, CRYPTO_RWLOCK *lock);
|
||||
int CRYPTO_atomic_store(uint64_t *dst, uint64_t val, CRYPTO_RWLOCK *lock);
|
||||
int CRYPTO_atomic_store_int(int *dst, int val, CRYPTO_RWLOCK *lock);
|
||||
|
||||
/* No longer needed, so this is a no-op */
|
||||
#define OPENSSL_malloc_init() while(0) continue
|
||||
#define OPENSSL_malloc_init() \
|
||||
while (0) \
|
||||
continue
|
||||
|
||||
int CRYPTO_mem_ctrl(int mode);
|
||||
|
||||
# define OPENSSL_malloc(num) \
|
||||
CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
|
||||
# define OPENSSL_zalloc(num) \
|
||||
CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
|
||||
# define OPENSSL_realloc(addr, num) \
|
||||
CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
|
||||
# define OPENSSL_clear_realloc(addr, old_num, num) \
|
||||
CRYPTO_clear_realloc(addr, old_num, num, OPENSSL_FILE, OPENSSL_LINE)
|
||||
# define OPENSSL_clear_free(addr, num) \
|
||||
CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
|
||||
# define OPENSSL_free(addr) \
|
||||
CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
|
||||
# define OPENSSL_memdup(str, s) \
|
||||
CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
|
||||
# define OPENSSL_strdup(str) \
|
||||
CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
|
||||
# define OPENSSL_strndup(str, n) \
|
||||
CRYPTO_strndup(str, n, OPENSSL_FILE, OPENSSL_LINE)
|
||||
# define OPENSSL_secure_malloc(num) \
|
||||
CRYPTO_secure_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
|
||||
# define OPENSSL_secure_zalloc(num) \
|
||||
CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
|
||||
# define OPENSSL_secure_free(addr) \
|
||||
CRYPTO_secure_free(addr, OPENSSL_FILE, OPENSSL_LINE)
|
||||
# define OPENSSL_secure_clear_free(addr, num) \
|
||||
CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
|
||||
# define OPENSSL_secure_actual_size(ptr) \
|
||||
CRYPTO_secure_actual_size(ptr)
|
||||
#define OPENSSL_malloc(num) \
|
||||
CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
|
||||
#define OPENSSL_zalloc(num) \
|
||||
CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
|
||||
#define OPENSSL_malloc_array(num, size) \
|
||||
CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
|
||||
#define OPENSSL_calloc(num, size) \
|
||||
CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
|
||||
#define OPENSSL_aligned_alloc(num, alignment, freeptr) \
|
||||
CRYPTO_aligned_alloc(num, alignment, freeptr, \
|
||||
OPENSSL_FILE, OPENSSL_LINE)
|
||||
#define OPENSSL_aligned_alloc_array(num, size, alignment, freeptr) \
|
||||
CRYPTO_aligned_alloc_array(num, size, alignment, freeptr, \
|
||||
OPENSSL_FILE, OPENSSL_LINE)
|
||||
#define OPENSSL_realloc(addr, num) \
|
||||
CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
|
||||
#define OPENSSL_clear_realloc(addr, old_num, num) \
|
||||
CRYPTO_clear_realloc(addr, old_num, num, OPENSSL_FILE, OPENSSL_LINE)
|
||||
#define OPENSSL_realloc_array(addr, num, size) \
|
||||
CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
|
||||
#define OPENSSL_clear_realloc_array(addr, old_num, num, size) \
|
||||
CRYPTO_clear_realloc_array(addr, old_num, num, size, \
|
||||
OPENSSL_FILE, OPENSSL_LINE)
|
||||
#define OPENSSL_clear_free(addr, num) \
|
||||
CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
|
||||
#define OPENSSL_free(addr) \
|
||||
CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
|
||||
#define OPENSSL_memdup(str, s) \
|
||||
CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
|
||||
#define OPENSSL_strdup(str) \
|
||||
CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
|
||||
#define OPENSSL_strndup(str, n) \
|
||||
CRYPTO_strndup(str, n, OPENSSL_FILE, OPENSSL_LINE)
|
||||
#define OPENSSL_secure_malloc(num) \
|
||||
CRYPTO_secure_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
|
||||
#define OPENSSL_secure_zalloc(num) \
|
||||
CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
|
||||
#define OPENSSL_secure_malloc_array(num, size) \
|
||||
CRYPTO_secure_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
|
||||
#define OPENSSL_secure_calloc(num, size) \
|
||||
CRYPTO_secure_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
|
||||
#define OPENSSL_secure_free(addr) \
|
||||
CRYPTO_secure_free(addr, OPENSSL_FILE, OPENSSL_LINE)
|
||||
#define OPENSSL_secure_clear_free(addr, num) \
|
||||
CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
|
||||
#define OPENSSL_secure_actual_size(ptr) \
|
||||
CRYPTO_secure_actual_size(ptr)
|
||||
|
||||
size_t OPENSSL_strlcpy(char *dst, const char *src, size_t siz);
|
||||
size_t OPENSSL_strlcat(char *dst, const char *src, size_t siz);
|
||||
size_t OPENSSL_strnlen(const char *str, size_t maxlen);
|
||||
char *OPENSSL_buf2hexstr(const unsigned char *buffer, long len);
|
||||
unsigned char *OPENSSL_hexstr2buf(const char *str, long *len);
|
||||
int OPENSSL_strtoul(const char *str, char **endptr, int base, unsigned long *num);
|
||||
int OPENSSL_buf2hexstr_ex(char *str, size_t str_n, size_t *strlength,
|
||||
const unsigned char *buf, size_t buflen,
|
||||
const char sep);
|
||||
char *OPENSSL_buf2hexstr(const unsigned char *buf, long buflen);
|
||||
int OPENSSL_hexstr2buf_ex(unsigned char *buf, size_t buf_n, size_t *buflen,
|
||||
const char *str, const char sep);
|
||||
unsigned char *OPENSSL_hexstr2buf(const char *str, long *buflen);
|
||||
int OPENSSL_hexchar2int(unsigned char c);
|
||||
int OPENSSL_strcasecmp(const char *s1, const char *s2);
|
||||
int OPENSSL_strncasecmp(const char *s1, const char *s2, size_t n);
|
||||
|
||||
# define OPENSSL_MALLOC_MAX_NELEMS(type) (((1U<<(sizeof(int)*8-1))-1)/sizeof(type))
|
||||
#define OPENSSL_MALLOC_MAX_NELEMS(type) (((1U << (sizeof(int) * 8 - 1)) - 1) / sizeof(type))
|
||||
|
||||
/*
|
||||
* These functions return the values of OPENSSL_VERSION_MAJOR,
|
||||
* OPENSSL_VERSION_MINOR, OPENSSL_VERSION_PATCH, OPENSSL_VERSION_PRE_RELEASE
|
||||
* and OPENSSL_VERSION_BUILD_METADATA, respectively.
|
||||
*/
|
||||
unsigned int OPENSSL_version_major(void);
|
||||
unsigned int OPENSSL_version_minor(void);
|
||||
unsigned int OPENSSL_version_patch(void);
|
||||
const char *OPENSSL_version_pre_release(void);
|
||||
const char *OPENSSL_version_build_metadata(void);
|
||||
|
||||
unsigned long OpenSSL_version_num(void);
|
||||
const char *OpenSSL_version(int type);
|
||||
# define OPENSSL_VERSION 0
|
||||
# define OPENSSL_CFLAGS 1
|
||||
# define OPENSSL_BUILT_ON 2
|
||||
# define OPENSSL_PLATFORM 3
|
||||
# define OPENSSL_DIR 4
|
||||
# define OPENSSL_ENGINES_DIR 5
|
||||
#define OPENSSL_VERSION 0
|
||||
#define OPENSSL_CFLAGS 1
|
||||
#define OPENSSL_BUILT_ON 2
|
||||
#define OPENSSL_PLATFORM 3
|
||||
#define OPENSSL_DIR 4
|
||||
#define OPENSSL_ENGINES_DIR 5
|
||||
#define OPENSSL_VERSION_STRING 6
|
||||
#define OPENSSL_FULL_VERSION_STRING 7
|
||||
#define OPENSSL_MODULES_DIR 8
|
||||
#define OPENSSL_CPU_INFO 9
|
||||
#define OPENSSL_WINCTX 10
|
||||
|
||||
const char *OPENSSL_info(int type);
|
||||
/*
|
||||
* The series starts at 1001 to avoid confusion with the OpenSSL_version
|
||||
* types.
|
||||
*/
|
||||
#define OPENSSL_INFO_CONFIG_DIR 1001
|
||||
#define OPENSSL_INFO_ENGINES_DIR 1002
|
||||
#define OPENSSL_INFO_MODULES_DIR 1003
|
||||
#define OPENSSL_INFO_DSO_EXTENSION 1004
|
||||
#define OPENSSL_INFO_DIR_FILENAME_SEPARATOR 1005
|
||||
#define OPENSSL_INFO_LIST_SEPARATOR 1006
|
||||
#define OPENSSL_INFO_SEED_SOURCE 1007
|
||||
#define OPENSSL_INFO_CPU_SETTINGS 1008
|
||||
#define OPENSSL_INFO_WINDOWS_CONTEXT 1009
|
||||
|
||||
int OPENSSL_issetugid(void);
|
||||
|
||||
typedef void CRYPTO_EX_new (void *parent, void *ptr, CRYPTO_EX_DATA *ad,
|
||||
int idx, long argl, void *argp);
|
||||
typedef void CRYPTO_EX_free (void *parent, void *ptr, CRYPTO_EX_DATA *ad,
|
||||
int idx, long argl, void *argp);
|
||||
typedef int CRYPTO_EX_dup (CRYPTO_EX_DATA *to, const CRYPTO_EX_DATA *from,
|
||||
void *from_d, int idx, long argl, void *argp);
|
||||
struct crypto_ex_data_st {
|
||||
OSSL_LIB_CTX *ctx;
|
||||
STACK_OF(void) *sk;
|
||||
};
|
||||
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(void, void, void)
|
||||
#define sk_void_num(sk) OPENSSL_sk_num(ossl_check_const_void_sk_type(sk))
|
||||
#define sk_void_value(sk, idx) ((void *)OPENSSL_sk_value(ossl_check_const_void_sk_type(sk), (idx)))
|
||||
#define sk_void_new(cmp) ((STACK_OF(void) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new(ossl_check_void_compfunc_type(cmp)), sk_void_cmpfunc_thunk))
|
||||
#define sk_void_new_null() ((STACK_OF(void) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_void_freefunc_thunk))
|
||||
#define sk_void_new_reserve(cmp, n) ((STACK_OF(void) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new_reserve(ossl_check_void_compfunc_type(cmp), (n)), sk_void_cmpfunc_thunk))
|
||||
#define sk_void_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_void_sk_type(sk), (n))
|
||||
#define sk_void_free(sk) OPENSSL_sk_free(ossl_check_void_sk_type(sk))
|
||||
#define sk_void_zero(sk) OPENSSL_sk_zero(ossl_check_void_sk_type(sk))
|
||||
#define sk_void_delete(sk, i) ((void *)OPENSSL_sk_delete(ossl_check_void_sk_type(sk), (i)))
|
||||
#define sk_void_delete_ptr(sk, ptr) ((void *)OPENSSL_sk_delete_ptr(ossl_check_void_sk_type(sk), ossl_check_void_type(ptr)))
|
||||
#define sk_void_push(sk, ptr) OPENSSL_sk_push(ossl_check_void_sk_type(sk), ossl_check_void_type(ptr))
|
||||
#define sk_void_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_void_sk_type(sk), ossl_check_void_type(ptr))
|
||||
#define sk_void_pop(sk) ((void *)OPENSSL_sk_pop(ossl_check_void_sk_type(sk)))
|
||||
#define sk_void_shift(sk) ((void *)OPENSSL_sk_shift(ossl_check_void_sk_type(sk)))
|
||||
#define sk_void_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_void_sk_type(sk), ossl_check_void_freefunc_type(freefunc))
|
||||
#define sk_void_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_void_sk_type(sk), ossl_check_void_type(ptr), (idx))
|
||||
#define sk_void_set(sk, idx, ptr) ((void *)OPENSSL_sk_set(ossl_check_void_sk_type(sk), (idx), ossl_check_void_type(ptr)))
|
||||
#define sk_void_find(sk, ptr) OPENSSL_sk_find(ossl_check_void_sk_type(sk), ossl_check_void_type(ptr))
|
||||
#define sk_void_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_void_sk_type(sk), ossl_check_void_type(ptr))
|
||||
#define sk_void_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_void_sk_type(sk), ossl_check_void_type(ptr), pnum)
|
||||
#define sk_void_sort(sk) OPENSSL_sk_sort(ossl_check_void_sk_type(sk))
|
||||
#define sk_void_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_void_sk_type(sk))
|
||||
#define sk_void_dup(sk) ((STACK_OF(void) *)OPENSSL_sk_dup(ossl_check_const_void_sk_type(sk)))
|
||||
#define sk_void_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(void) *)OPENSSL_sk_deep_copy(ossl_check_const_void_sk_type(sk), ossl_check_void_copyfunc_type(copyfunc), ossl_check_void_freefunc_type(freefunc)))
|
||||
#define sk_void_set_cmp_func(sk, cmp) ((sk_void_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_void_sk_type(sk), ossl_check_void_compfunc_type(cmp)))
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
/*
|
||||
* Per class, we have a STACK of function pointers.
|
||||
*/
|
||||
#define CRYPTO_EX_INDEX_SSL 0
|
||||
#define CRYPTO_EX_INDEX_SSL_CTX 1
|
||||
#define CRYPTO_EX_INDEX_SSL_SESSION 2
|
||||
#define CRYPTO_EX_INDEX_X509 3
|
||||
#define CRYPTO_EX_INDEX_X509_STORE 4
|
||||
#define CRYPTO_EX_INDEX_X509_STORE_CTX 5
|
||||
#define CRYPTO_EX_INDEX_DH 6
|
||||
#define CRYPTO_EX_INDEX_DSA 7
|
||||
#define CRYPTO_EX_INDEX_EC_KEY 8
|
||||
#define CRYPTO_EX_INDEX_RSA 9
|
||||
#define CRYPTO_EX_INDEX_ENGINE 10
|
||||
#define CRYPTO_EX_INDEX_UI 11
|
||||
#define CRYPTO_EX_INDEX_BIO 12
|
||||
#define CRYPTO_EX_INDEX_APP 13
|
||||
#define CRYPTO_EX_INDEX_UI_METHOD 14
|
||||
#define CRYPTO_EX_INDEX_RAND_DRBG 15
|
||||
#define CRYPTO_EX_INDEX_DRBG CRYPTO_EX_INDEX_RAND_DRBG
|
||||
#define CRYPTO_EX_INDEX_OSSL_LIB_CTX 16
|
||||
#define CRYPTO_EX_INDEX_EVP_PKEY 17
|
||||
#define CRYPTO_EX_INDEX__COUNT 18
|
||||
|
||||
typedef void CRYPTO_EX_new(void *parent, void *ptr, CRYPTO_EX_DATA *ad,
|
||||
int idx, long argl, void *argp);
|
||||
typedef void CRYPTO_EX_free(void *parent, void *ptr, CRYPTO_EX_DATA *ad,
|
||||
int idx, long argl, void *argp);
|
||||
typedef int CRYPTO_EX_dup(CRYPTO_EX_DATA *to, const CRYPTO_EX_DATA *from,
|
||||
void **from_d, int idx, long argl, void *argp);
|
||||
__owur int CRYPTO_get_ex_new_index(int class_index, long argl, void *argp,
|
||||
CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func,
|
||||
CRYPTO_EX_free *free_func);
|
||||
CRYPTO_EX_new *new_func,
|
||||
CRYPTO_EX_dup *dup_func,
|
||||
CRYPTO_EX_free *free_func);
|
||||
/* No longer use an index. */
|
||||
int CRYPTO_free_ex_index(int class_index, int idx);
|
||||
|
||||
@@ -181,10 +288,14 @@ int CRYPTO_free_ex_index(int class_index, int idx);
|
||||
*/
|
||||
int CRYPTO_new_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad);
|
||||
int CRYPTO_dup_ex_data(int class_index, CRYPTO_EX_DATA *to,
|
||||
const CRYPTO_EX_DATA *from);
|
||||
const CRYPTO_EX_DATA *from);
|
||||
|
||||
void CRYPTO_free_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad);
|
||||
|
||||
/* Allocate a single item in the CRYPTO_EX_DATA variable */
|
||||
int CRYPTO_alloc_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad,
|
||||
int idx);
|
||||
|
||||
/*
|
||||
* Get/set data in a CRYPTO_EX_DATA variable corresponding to a particular
|
||||
* index (relative to the class type involved)
|
||||
@@ -192,12 +303,14 @@ void CRYPTO_free_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad);
|
||||
int CRYPTO_set_ex_data(CRYPTO_EX_DATA *ad, int idx, void *val);
|
||||
void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx);
|
||||
|
||||
# if OPENSSL_API_COMPAT < 0x10100000L
|
||||
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
/*
|
||||
* This function cleans up all "ex_data" state. It mustn't be called under
|
||||
* potential race-conditions.
|
||||
*/
|
||||
# define CRYPTO_cleanup_all_ex_data() while(0) continue
|
||||
#define CRYPTO_cleanup_all_ex_data() \
|
||||
while (0) \
|
||||
continue
|
||||
|
||||
/*
|
||||
* The old locking functions have been removed completely without compatibility
|
||||
@@ -209,62 +322,73 @@ void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx);
|
||||
* On the other hand, the locking callbacks are no longer used. Consequently,
|
||||
* the callback management functions can be safely replaced with no-op macros.
|
||||
*/
|
||||
# define CRYPTO_num_locks() (1)
|
||||
# define CRYPTO_set_locking_callback(func)
|
||||
# define CRYPTO_get_locking_callback() (NULL)
|
||||
# define CRYPTO_set_add_lock_callback(func)
|
||||
# define CRYPTO_get_add_lock_callback() (NULL)
|
||||
#define CRYPTO_num_locks() (1)
|
||||
#define CRYPTO_set_locking_callback(func)
|
||||
#define CRYPTO_get_locking_callback() (NULL)
|
||||
#define CRYPTO_set_add_lock_callback(func)
|
||||
#define CRYPTO_get_add_lock_callback() (NULL)
|
||||
|
||||
/*
|
||||
* These defines where used in combination with the old locking callbacks,
|
||||
* they are not called anymore, but old code that's not called might still
|
||||
* use them.
|
||||
*/
|
||||
# define CRYPTO_LOCK 1
|
||||
# define CRYPTO_UNLOCK 2
|
||||
# define CRYPTO_READ 4
|
||||
# define CRYPTO_WRITE 8
|
||||
#define CRYPTO_LOCK 1
|
||||
#define CRYPTO_UNLOCK 2
|
||||
#define CRYPTO_READ 4
|
||||
#define CRYPTO_WRITE 8
|
||||
|
||||
/* This structure is no longer used */
|
||||
typedef struct crypto_threadid_st {
|
||||
int dummy;
|
||||
} CRYPTO_THREADID;
|
||||
/* Only use CRYPTO_THREADID_set_[numeric|pointer]() within callbacks */
|
||||
# define CRYPTO_THREADID_set_numeric(id, val)
|
||||
# define CRYPTO_THREADID_set_pointer(id, ptr)
|
||||
# define CRYPTO_THREADID_set_callback(threadid_func) (0)
|
||||
# define CRYPTO_THREADID_get_callback() (NULL)
|
||||
# define CRYPTO_THREADID_current(id)
|
||||
# define CRYPTO_THREADID_cmp(a, b) (-1)
|
||||
# define CRYPTO_THREADID_cpy(dest, src)
|
||||
# define CRYPTO_THREADID_hash(id) (0UL)
|
||||
#define CRYPTO_THREADID_set_numeric(id, val)
|
||||
#define CRYPTO_THREADID_set_pointer(id, ptr)
|
||||
#define CRYPTO_THREADID_set_callback(threadid_func) (0)
|
||||
#define CRYPTO_THREADID_get_callback() (NULL)
|
||||
#define CRYPTO_THREADID_current(id)
|
||||
#define CRYPTO_THREADID_cmp(a, b) (-1)
|
||||
#define CRYPTO_THREADID_cpy(dest, src)
|
||||
#define CRYPTO_THREADID_hash(id) (0UL)
|
||||
|
||||
# if OPENSSL_API_COMPAT < 0x10000000L
|
||||
# define CRYPTO_set_id_callback(func)
|
||||
# define CRYPTO_get_id_callback() (NULL)
|
||||
# define CRYPTO_thread_id() (0UL)
|
||||
# endif /* OPENSSL_API_COMPAT < 0x10000000L */
|
||||
#ifndef OPENSSL_NO_DEPRECATED_1_0_0
|
||||
#define CRYPTO_set_id_callback(func)
|
||||
#define CRYPTO_get_id_callback() (NULL)
|
||||
#define CRYPTO_thread_id() (0UL)
|
||||
#endif /* OPENSSL_NO_DEPRECATED_1_0_0 */
|
||||
|
||||
# define CRYPTO_set_dynlock_create_callback(dyn_create_function)
|
||||
# define CRYPTO_set_dynlock_lock_callback(dyn_lock_function)
|
||||
# define CRYPTO_set_dynlock_destroy_callback(dyn_destroy_function)
|
||||
# define CRYPTO_get_dynlock_create_callback() (NULL)
|
||||
# define CRYPTO_get_dynlock_lock_callback() (NULL)
|
||||
# define CRYPTO_get_dynlock_destroy_callback() (NULL)
|
||||
# endif /* OPENSSL_API_COMPAT < 0x10100000L */
|
||||
#define CRYPTO_set_dynlock_create_callback(dyn_create_function)
|
||||
#define CRYPTO_set_dynlock_lock_callback(dyn_lock_function)
|
||||
#define CRYPTO_set_dynlock_destroy_callback(dyn_destroy_function)
|
||||
#define CRYPTO_get_dynlock_create_callback() (NULL)
|
||||
#define CRYPTO_get_dynlock_lock_callback() (NULL)
|
||||
#define CRYPTO_get_dynlock_destroy_callback() (NULL)
|
||||
#endif /* OPENSSL_NO_DEPRECATED_1_1_0 */
|
||||
|
||||
int CRYPTO_set_mem_functions(
|
||||
void *(*m) (size_t, const char *, int),
|
||||
void *(*r) (void *, size_t, const char *, int),
|
||||
void (*f) (void *, const char *, int));
|
||||
int CRYPTO_set_mem_debug(int flag);
|
||||
void CRYPTO_get_mem_functions(
|
||||
void *(**m) (size_t, const char *, int),
|
||||
void *(**r) (void *, size_t, const char *, int),
|
||||
void (**f) (void *, const char *, int));
|
||||
typedef void *(*CRYPTO_malloc_fn)(size_t num, const char *file, int line);
|
||||
typedef void *(*CRYPTO_realloc_fn)(void *addr, size_t num, const char *file,
|
||||
int line);
|
||||
typedef void (*CRYPTO_free_fn)(void *addr, const char *file, int line);
|
||||
int CRYPTO_set_mem_functions(CRYPTO_malloc_fn malloc_fn,
|
||||
CRYPTO_realloc_fn realloc_fn,
|
||||
CRYPTO_free_fn free_fn);
|
||||
void CRYPTO_get_mem_functions(CRYPTO_malloc_fn *malloc_fn,
|
||||
CRYPTO_realloc_fn *realloc_fn,
|
||||
CRYPTO_free_fn *free_fn);
|
||||
|
||||
void *CRYPTO_malloc(size_t num, const char *file, int line);
|
||||
void *CRYPTO_zalloc(size_t num, const char *file, int line);
|
||||
OSSL_CRYPTO_ALLOC void *CRYPTO_malloc(size_t num, const char *file, int line);
|
||||
OSSL_CRYPTO_ALLOC void *CRYPTO_zalloc(size_t num, const char *file, int line);
|
||||
OSSL_CRYPTO_ALLOC void *CRYPTO_malloc_array(size_t num, size_t size,
|
||||
const char *file, int line);
|
||||
OSSL_CRYPTO_ALLOC void *CRYPTO_calloc(size_t num, size_t size,
|
||||
const char *file, int line);
|
||||
OSSL_CRYPTO_ALLOC void *CRYPTO_aligned_alloc(size_t num, size_t align,
|
||||
void **freeptr, const char *file,
|
||||
int line);
|
||||
OSSL_CRYPTO_ALLOC void *CRYPTO_aligned_alloc_array(size_t num, size_t size,
|
||||
size_t align, void **freeptr,
|
||||
const char *file, int line);
|
||||
void *CRYPTO_memdup(const void *str, size_t siz, const char *file, int line);
|
||||
char *CRYPTO_strdup(const char *str, const char *file, int line);
|
||||
char *CRYPTO_strndup(const char *str, size_t s, const char *file, int line);
|
||||
@@ -272,15 +396,23 @@ void CRYPTO_free(void *ptr, const char *file, int line);
|
||||
void CRYPTO_clear_free(void *ptr, size_t num, const char *file, int line);
|
||||
void *CRYPTO_realloc(void *addr, size_t num, const char *file, int line);
|
||||
void *CRYPTO_clear_realloc(void *addr, size_t old_num, size_t num,
|
||||
const char *file, int line);
|
||||
const char *file, int line);
|
||||
void *CRYPTO_realloc_array(void *addr, size_t num, size_t size,
|
||||
const char *file, int line);
|
||||
void *CRYPTO_clear_realloc_array(void *addr, size_t old_num, size_t num,
|
||||
size_t size, const char *file, int line);
|
||||
|
||||
int CRYPTO_secure_malloc_init(size_t sz, int minsize);
|
||||
int CRYPTO_secure_malloc_init(size_t sz, size_t minsize);
|
||||
int CRYPTO_secure_malloc_done(void);
|
||||
void *CRYPTO_secure_malloc(size_t num, const char *file, int line);
|
||||
void *CRYPTO_secure_zalloc(size_t num, const char *file, int line);
|
||||
OSSL_CRYPTO_ALLOC void *CRYPTO_secure_malloc(size_t num, const char *file, int line);
|
||||
OSSL_CRYPTO_ALLOC void *CRYPTO_secure_zalloc(size_t num, const char *file, int line);
|
||||
OSSL_CRYPTO_ALLOC void *CRYPTO_secure_malloc_array(size_t num, size_t size,
|
||||
const char *file, int line);
|
||||
OSSL_CRYPTO_ALLOC void *CRYPTO_secure_calloc(size_t num, size_t size,
|
||||
const char *file, int line);
|
||||
void CRYPTO_secure_free(void *ptr, const char *file, int line);
|
||||
void CRYPTO_secure_clear_free(void *ptr, size_t num,
|
||||
const char *file, int line);
|
||||
const char *file, int line);
|
||||
int CRYPTO_secure_allocated(const void *ptr);
|
||||
int CRYPTO_secure_malloc_initialized(void);
|
||||
size_t CRYPTO_secure_actual_size(void *ptr);
|
||||
@@ -288,60 +420,77 @@ size_t CRYPTO_secure_used(void);
|
||||
|
||||
void OPENSSL_cleanse(void *ptr, size_t len);
|
||||
|
||||
# ifndef OPENSSL_NO_CRYPTO_MDEBUG
|
||||
# define OPENSSL_mem_debug_push(info) \
|
||||
CRYPTO_mem_debug_push(info, OPENSSL_FILE, OPENSSL_LINE)
|
||||
# define OPENSSL_mem_debug_pop() \
|
||||
CRYPTO_mem_debug_pop()
|
||||
int CRYPTO_mem_debug_push(const char *info, const char *file, int line);
|
||||
int CRYPTO_mem_debug_pop(void);
|
||||
void CRYPTO_get_alloc_counts(int *mcount, int *rcount, int *fcount);
|
||||
|
||||
/*-
|
||||
* Debugging functions (enabled by CRYPTO_set_mem_debug(1))
|
||||
* The flag argument has the following significance:
|
||||
* 0: called before the actual memory allocation has taken place
|
||||
* 1: called after the actual memory allocation has taken place
|
||||
#ifndef OPENSSL_NO_CRYPTO_MDEBUG
|
||||
/*
|
||||
* The following can be used to detect memory leaks in the library. If
|
||||
* used, it turns on malloc checking
|
||||
*/
|
||||
void CRYPTO_mem_debug_malloc(void *addr, size_t num, int flag,
|
||||
const char *file, int line);
|
||||
void CRYPTO_mem_debug_realloc(void *addr1, void *addr2, size_t num, int flag,
|
||||
const char *file, int line);
|
||||
void CRYPTO_mem_debug_free(void *addr, int flag,
|
||||
const char *file, int line);
|
||||
#define CRYPTO_MEM_CHECK_OFF 0x0 /* Control only */
|
||||
#define CRYPTO_MEM_CHECK_ON 0x1 /* Control and mode bit */
|
||||
#define CRYPTO_MEM_CHECK_ENABLE 0x2 /* Control and mode bit */
|
||||
#define CRYPTO_MEM_CHECK_DISABLE 0x3 /* Control only */
|
||||
|
||||
int CRYPTO_mem_leaks_cb(int (*cb) (const char *str, size_t len, void *u),
|
||||
void *u);
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
int CRYPTO_mem_leaks_fp(FILE *);
|
||||
# endif
|
||||
int CRYPTO_mem_leaks(BIO *bio);
|
||||
# endif
|
||||
/* max allowed length for value of OPENSSL_MALLOC_FAILURES env var. */
|
||||
#define CRYPTO_MEM_CHECK_MAX_FS 256
|
||||
|
||||
void CRYPTO_get_alloc_counts(int *mcount, int *rcount, int *fcount);
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#define OPENSSL_mem_debug_push(info) \
|
||||
CRYPTO_mem_debug_push(info, OPENSSL_FILE, OPENSSL_LINE)
|
||||
#define OPENSSL_mem_debug_pop() \
|
||||
CRYPTO_mem_debug_pop()
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
OSSL_DEPRECATEDIN_3_0 int CRYPTO_set_mem_debug(int flag);
|
||||
OSSL_DEPRECATEDIN_3_0 int CRYPTO_mem_ctrl(int mode);
|
||||
OSSL_DEPRECATEDIN_3_0 int CRYPTO_mem_debug_push(const char *info,
|
||||
const char *file, int line);
|
||||
OSSL_DEPRECATEDIN_3_0 int CRYPTO_mem_debug_pop(void);
|
||||
OSSL_DEPRECATEDIN_3_0 void CRYPTO_mem_debug_malloc(void *addr, size_t num,
|
||||
int flag,
|
||||
const char *file, int line);
|
||||
OSSL_DEPRECATEDIN_3_0 void CRYPTO_mem_debug_realloc(void *addr1, void *addr2,
|
||||
size_t num, int flag,
|
||||
const char *file, int line);
|
||||
OSSL_DEPRECATEDIN_3_0 void CRYPTO_mem_debug_free(void *addr, int flag,
|
||||
const char *file, int line);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
int CRYPTO_mem_leaks_cb(int (*cb)(const char *str, size_t len, void *u),
|
||||
void *u);
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_STDIO
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
OSSL_DEPRECATEDIN_3_0 int CRYPTO_mem_leaks_fp(FILE *);
|
||||
#endif
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
OSSL_DEPRECATEDIN_3_0 int CRYPTO_mem_leaks(BIO *bio);
|
||||
#endif
|
||||
#endif /* OPENSSL_NO_CRYPTO_MDEBUG */
|
||||
|
||||
/* die if we have to */
|
||||
ossl_noreturn void OPENSSL_die(const char *assertion, const char *file, int line);
|
||||
# if OPENSSL_API_COMPAT < 0x10100000L
|
||||
# define OpenSSLDie(f,l,a) OPENSSL_die((a),(f),(l))
|
||||
# endif
|
||||
# define OPENSSL_assert(e) \
|
||||
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
#define OpenSSLDie(f, l, a) OPENSSL_die((a), (f), (l))
|
||||
#endif
|
||||
#define OPENSSL_assert(e) \
|
||||
(void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
|
||||
|
||||
int OPENSSL_isservice(void);
|
||||
|
||||
int FIPS_mode(void);
|
||||
int FIPS_mode_set(int r);
|
||||
|
||||
void OPENSSL_init(void);
|
||||
# ifdef OPENSSL_SYS_UNIX
|
||||
void OPENSSL_fork_prepare(void);
|
||||
void OPENSSL_fork_parent(void);
|
||||
void OPENSSL_fork_child(void);
|
||||
# endif
|
||||
#ifdef OPENSSL_SYS_UNIX
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
OSSL_DEPRECATEDIN_3_0 void OPENSSL_fork_prepare(void);
|
||||
OSSL_DEPRECATEDIN_3_0 void OPENSSL_fork_parent(void);
|
||||
OSSL_DEPRECATEDIN_3_0 void OPENSSL_fork_child(void);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result);
|
||||
int OPENSSL_gmtime_adj(struct tm *tm, int offset_day, long offset_sec);
|
||||
int OPENSSL_gmtime_diff(int *pday, int *psec,
|
||||
const struct tm *from, const struct tm *to);
|
||||
const struct tm *from, const struct tm *to);
|
||||
|
||||
/*
|
||||
* CRYPTO_memcmp returns zero iff the |len| bytes at |a| and |b| are equal.
|
||||
@@ -350,83 +499,94 @@ int OPENSSL_gmtime_diff(int *pday, int *psec,
|
||||
* into a defined order as the return value when a != b is undefined, other
|
||||
* than to be non-zero.
|
||||
*/
|
||||
int CRYPTO_memcmp(const void * in_a, const void * in_b, size_t len);
|
||||
int CRYPTO_memcmp(const void *in_a, const void *in_b, size_t len);
|
||||
|
||||
/* Standard initialisation options */
|
||||
# define OPENSSL_INIT_NO_LOAD_CRYPTO_STRINGS 0x00000001L
|
||||
# define OPENSSL_INIT_LOAD_CRYPTO_STRINGS 0x00000002L
|
||||
# define OPENSSL_INIT_ADD_ALL_CIPHERS 0x00000004L
|
||||
# define OPENSSL_INIT_ADD_ALL_DIGESTS 0x00000008L
|
||||
# define OPENSSL_INIT_NO_ADD_ALL_CIPHERS 0x00000010L
|
||||
# define OPENSSL_INIT_NO_ADD_ALL_DIGESTS 0x00000020L
|
||||
# define OPENSSL_INIT_LOAD_CONFIG 0x00000040L
|
||||
# define OPENSSL_INIT_NO_LOAD_CONFIG 0x00000080L
|
||||
# define OPENSSL_INIT_ASYNC 0x00000100L
|
||||
# define OPENSSL_INIT_ENGINE_RDRAND 0x00000200L
|
||||
# define OPENSSL_INIT_ENGINE_DYNAMIC 0x00000400L
|
||||
# define OPENSSL_INIT_ENGINE_OPENSSL 0x00000800L
|
||||
# define OPENSSL_INIT_ENGINE_CRYPTODEV 0x00001000L
|
||||
# define OPENSSL_INIT_ENGINE_CAPI 0x00002000L
|
||||
# define OPENSSL_INIT_ENGINE_PADLOCK 0x00004000L
|
||||
# define OPENSSL_INIT_ENGINE_AFALG 0x00008000L
|
||||
/* OPENSSL_INIT_ZLIB 0x00010000L */
|
||||
# define OPENSSL_INIT_ATFORK 0x00020000L
|
||||
#define OPENSSL_INIT_NO_LOAD_CRYPTO_STRINGS 0x00000001L
|
||||
#define OPENSSL_INIT_LOAD_CRYPTO_STRINGS 0x00000002L
|
||||
#define OPENSSL_INIT_ADD_ALL_CIPHERS 0x00000004L
|
||||
#define OPENSSL_INIT_ADD_ALL_DIGESTS 0x00000008L
|
||||
#define OPENSSL_INIT_NO_ADD_ALL_CIPHERS 0x00000010L
|
||||
#define OPENSSL_INIT_NO_ADD_ALL_DIGESTS 0x00000020L
|
||||
#define OPENSSL_INIT_LOAD_CONFIG 0x00000040L
|
||||
#define OPENSSL_INIT_NO_LOAD_CONFIG 0x00000080L
|
||||
#define OPENSSL_INIT_ASYNC 0x00000100L
|
||||
/* FREE: 0x00010000L */
|
||||
#define OPENSSL_INIT_ATFORK 0x00020000L
|
||||
/* OPENSSL_INIT_BASE_ONLY 0x00040000L */
|
||||
# define OPENSSL_INIT_NO_ATEXIT 0x00080000L
|
||||
/* OPENSSL_INIT flag range 0xfff00000 reserved for OPENSSL_init_ssl() */
|
||||
#define OPENSSL_INIT_NO_ATEXIT 0x00080000L
|
||||
/* OPENSSL_INIT flag range 0x03f00000 reserved for OPENSSL_init_ssl() */
|
||||
/* FREE: 0x04000000L */
|
||||
/* FREE: 0x08000000L */
|
||||
/* FREE: 0x10000000L */
|
||||
/* FREE: 0x20000000L */
|
||||
/* FREE: 0x40000000L */
|
||||
/* FREE: 0x80000000L */
|
||||
/* Max OPENSSL_INIT flag value is 0x80000000 */
|
||||
|
||||
/* openssl and dasync not counted as builtin */
|
||||
# define OPENSSL_INIT_ENGINE_ALL_BUILTIN \
|
||||
(OPENSSL_INIT_ENGINE_RDRAND | OPENSSL_INIT_ENGINE_DYNAMIC \
|
||||
| OPENSSL_INIT_ENGINE_CRYPTODEV | OPENSSL_INIT_ENGINE_CAPI | \
|
||||
OPENSSL_INIT_ENGINE_PADLOCK)
|
||||
/* ENGINEs are no longer available */
|
||||
#define OPENSSL_INIT_ENGINE_ALL_BUILTIN 0
|
||||
|
||||
#ifdef OPENSSL_ENGINE_STUBS
|
||||
#define OPENSSL_INIT_ENGINE_RDRAND 0
|
||||
#define OPENSSL_INIT_ENGINE_DYNAMIC 0
|
||||
#define OPENSSL_INIT_ENGINE_OPENSSL 0
|
||||
#define OPENSSL_INIT_ENGINE_CRYPTODEV 0
|
||||
#define OPENSSL_INIT_ENGINE_CAPI 0
|
||||
#define OPENSSL_INIT_ENGINE_PADLOCK 0
|
||||
#define OPENSSL_INIT_ENGINE_AFALG 0
|
||||
#endif
|
||||
|
||||
/* Library initialisation functions */
|
||||
void OPENSSL_cleanup(void);
|
||||
int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings);
|
||||
int OPENSSL_atexit(void (*handler)(void));
|
||||
void OPENSSL_thread_stop(void);
|
||||
void OPENSSL_thread_stop_ex(OSSL_LIB_CTX *ctx);
|
||||
|
||||
/* Low-level control of initialization */
|
||||
OPENSSL_INIT_SETTINGS *OPENSSL_INIT_new(void);
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
#ifndef OPENSSL_NO_STDIO
|
||||
int OPENSSL_INIT_set_config_filename(OPENSSL_INIT_SETTINGS *settings,
|
||||
const char *config_filename);
|
||||
const char *config_filename);
|
||||
void OPENSSL_INIT_set_config_file_flags(OPENSSL_INIT_SETTINGS *settings,
|
||||
unsigned long flags);
|
||||
unsigned long flags);
|
||||
int OPENSSL_INIT_set_config_appname(OPENSSL_INIT_SETTINGS *settings,
|
||||
const char *config_appname);
|
||||
# endif
|
||||
const char *config_appname);
|
||||
#endif
|
||||
void OPENSSL_INIT_free(OPENSSL_INIT_SETTINGS *settings);
|
||||
|
||||
# if defined(OPENSSL_THREADS) && !defined(CRYPTO_TDEBUG)
|
||||
# if defined(_WIN32)
|
||||
# if defined(BASETYPES) || defined(_WINDEF_H)
|
||||
#if defined(OPENSSL_THREADS) && !defined(CRYPTO_TDEBUG)
|
||||
#if defined(_WIN32)
|
||||
#if defined(BASETYPES) || defined(_WINDEF_H)
|
||||
/* application has to include <windows.h> in order to use this */
|
||||
typedef DWORD CRYPTO_THREAD_LOCAL;
|
||||
typedef DWORD CRYPTO_THREAD_ID;
|
||||
|
||||
typedef LONG CRYPTO_ONCE;
|
||||
# define CRYPTO_ONCE_STATIC_INIT 0
|
||||
# endif
|
||||
# else
|
||||
# include <pthread.h>
|
||||
#define CRYPTO_ONCE_STATIC_INIT 0
|
||||
#endif
|
||||
#else
|
||||
#if defined(__TANDEM) && defined(_SPT_MODEL_)
|
||||
#define SPT_THREAD_SIGNAL 1
|
||||
#define SPT_THREAD_AWARE 1
|
||||
#include <spthread.h>
|
||||
#else
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
typedef pthread_once_t CRYPTO_ONCE;
|
||||
typedef pthread_key_t CRYPTO_THREAD_LOCAL;
|
||||
typedef pthread_t CRYPTO_THREAD_ID;
|
||||
|
||||
# define CRYPTO_ONCE_STATIC_INIT PTHREAD_ONCE_INIT
|
||||
# endif
|
||||
# endif
|
||||
#define CRYPTO_ONCE_STATIC_INIT PTHREAD_ONCE_INIT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
# if !defined(CRYPTO_ONCE_STATIC_INIT)
|
||||
#if !defined(CRYPTO_ONCE_STATIC_INIT)
|
||||
typedef unsigned int CRYPTO_ONCE;
|
||||
typedef unsigned int CRYPTO_THREAD_LOCAL;
|
||||
typedef unsigned int CRYPTO_THREAD_ID;
|
||||
# define CRYPTO_ONCE_STATIC_INIT 0
|
||||
# endif
|
||||
#define CRYPTO_ONCE_STATIC_INIT 0
|
||||
#endif
|
||||
|
||||
int CRYPTO_THREAD_run_once(CRYPTO_ONCE *once, void (*init)(void));
|
||||
|
||||
@@ -438,8 +598,23 @@ int CRYPTO_THREAD_cleanup_local(CRYPTO_THREAD_LOCAL *key);
|
||||
CRYPTO_THREAD_ID CRYPTO_THREAD_get_current_id(void);
|
||||
int CRYPTO_THREAD_compare_id(CRYPTO_THREAD_ID a, CRYPTO_THREAD_ID b);
|
||||
|
||||
OSSL_LIB_CTX *OSSL_LIB_CTX_new(void);
|
||||
OSSL_LIB_CTX *OSSL_LIB_CTX_new_from_dispatch(const OSSL_CORE_HANDLE *handle,
|
||||
const OSSL_DISPATCH *in);
|
||||
OSSL_LIB_CTX *OSSL_LIB_CTX_new_child(const OSSL_CORE_HANDLE *handle,
|
||||
const OSSL_DISPATCH *in);
|
||||
int OSSL_LIB_CTX_load_config(OSSL_LIB_CTX *ctx, const char *config_file);
|
||||
void OSSL_LIB_CTX_free(OSSL_LIB_CTX *);
|
||||
OSSL_LIB_CTX *OSSL_LIB_CTX_get0_global_default(void);
|
||||
OSSL_LIB_CTX *OSSL_LIB_CTX_set0_default(OSSL_LIB_CTX *libctx);
|
||||
int OSSL_LIB_CTX_get_conf_diagnostics(OSSL_LIB_CTX *ctx);
|
||||
void OSSL_LIB_CTX_set_conf_diagnostics(OSSL_LIB_CTX *ctx, int value);
|
||||
|
||||
# ifdef __cplusplus
|
||||
void OSSL_sleep(uint64_t millis);
|
||||
|
||||
void *OSSL_LIB_CTX_get_data(OSSL_LIB_CTX *ctx, int index);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1,57 +1,54 @@
|
||||
/*
|
||||
* Generated by util/mkerr.pl DO NOT EDIT
|
||||
* Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 1995-2024 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (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
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#ifndef HEADER_CRYPTOERR_H
|
||||
# define HEADER_CRYPTOERR_H
|
||||
#ifndef OPENSSL_CRYPTOERR_H
|
||||
#define OPENSSL_CRYPTOERR_H
|
||||
#pragma once
|
||||
|
||||
# ifndef HEADER_SYMHACKS_H
|
||||
# include <openssl/symhacks.h>
|
||||
# endif
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C"
|
||||
# endif
|
||||
int ERR_load_CRYPTO_strings(void);
|
||||
|
||||
/*
|
||||
* CRYPTO function codes.
|
||||
*/
|
||||
# define CRYPTO_F_CMAC_CTX_NEW 120
|
||||
# define CRYPTO_F_CRYPTO_DUP_EX_DATA 110
|
||||
# define CRYPTO_F_CRYPTO_FREE_EX_DATA 111
|
||||
# define CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX 100
|
||||
# define CRYPTO_F_CRYPTO_MEMDUP 115
|
||||
# define CRYPTO_F_CRYPTO_NEW_EX_DATA 112
|
||||
# define CRYPTO_F_CRYPTO_OCB128_COPY_CTX 121
|
||||
# define CRYPTO_F_CRYPTO_OCB128_INIT 122
|
||||
# define CRYPTO_F_CRYPTO_SET_EX_DATA 102
|
||||
# define CRYPTO_F_FIPS_MODE_SET 109
|
||||
# define CRYPTO_F_GET_AND_LOCK 113
|
||||
# define CRYPTO_F_OPENSSL_ATEXIT 114
|
||||
# define CRYPTO_F_OPENSSL_BUF2HEXSTR 117
|
||||
# define CRYPTO_F_OPENSSL_FOPEN 119
|
||||
# define CRYPTO_F_OPENSSL_HEXSTR2BUF 118
|
||||
# define CRYPTO_F_OPENSSL_INIT_CRYPTO 116
|
||||
# define CRYPTO_F_OPENSSL_LH_NEW 126
|
||||
# define CRYPTO_F_OPENSSL_SK_DEEP_COPY 127
|
||||
# define CRYPTO_F_OPENSSL_SK_DUP 128
|
||||
# define CRYPTO_F_PKEY_HMAC_INIT 123
|
||||
# define CRYPTO_F_PKEY_POLY1305_INIT 124
|
||||
# define CRYPTO_F_PKEY_SIPHASH_INIT 125
|
||||
# define CRYPTO_F_SK_RESERVE 129
|
||||
#include <openssl/opensslconf.h>
|
||||
#include <openssl/symhacks.h>
|
||||
#include <openssl/cryptoerr_legacy.h>
|
||||
|
||||
/*
|
||||
* CRYPTO reason codes.
|
||||
*/
|
||||
# define CRYPTO_R_FIPS_MODE_NOT_SUPPORTED 101
|
||||
# define CRYPTO_R_ILLEGAL_HEX_DIGIT 102
|
||||
# define CRYPTO_R_ODD_NUMBER_OF_DIGITS 103
|
||||
#define CRYPTO_R_BAD_ALGORITHM_NAME 117
|
||||
#define CRYPTO_R_CONFLICTING_NAMES 118
|
||||
#define CRYPTO_R_HEX_STRING_TOO_SHORT 121
|
||||
#define CRYPTO_R_ILLEGAL_HEX_DIGIT 102
|
||||
#define CRYPTO_R_INSUFFICIENT_DATA_SPACE 106
|
||||
#define CRYPTO_R_INSUFFICIENT_PARAM_SIZE 107
|
||||
#define CRYPTO_R_INSUFFICIENT_SECURE_DATA_SPACE 108
|
||||
#define CRYPTO_R_INTEGER_OVERFLOW 127
|
||||
#define CRYPTO_R_INVALID_NEGATIVE_VALUE 122
|
||||
#define CRYPTO_R_INVALID_NULL_ARGUMENT 109
|
||||
#define CRYPTO_R_INVALID_OSSL_PARAM_TYPE 110
|
||||
#define CRYPTO_R_NO_PARAMS_TO_MERGE 131
|
||||
#define CRYPTO_R_NO_SPACE_FOR_TERMINATING_NULL 128
|
||||
#define CRYPTO_R_ODD_NUMBER_OF_DIGITS 103
|
||||
#define CRYPTO_R_PARAM_CANNOT_BE_REPRESENTED_EXACTLY 123
|
||||
#define CRYPTO_R_PARAM_NOT_INTEGER_TYPE 124
|
||||
#define CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE 129
|
||||
#define CRYPTO_R_PARAM_UNSIGNED_INTEGER_NEGATIVE_VALUE_UNSUPPORTED 125
|
||||
#define CRYPTO_R_PARAM_UNSUPPORTED_FLOATING_POINT_FORMAT 130
|
||||
#define CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION 126
|
||||
#define CRYPTO_R_PROVIDER_ALREADY_EXISTS 104
|
||||
#define CRYPTO_R_PROVIDER_SECTION_ERROR 105
|
||||
#define CRYPTO_R_RANDOM_SECTION_ERROR 119
|
||||
#define CRYPTO_R_SECURE_MALLOC_FAILURE 111
|
||||
#define CRYPTO_R_STRING_TOO_LONG 112
|
||||
#define CRYPTO_R_TOO_MANY_BYTES 113
|
||||
#define CRYPTO_R_TOO_MANY_NAMES 132
|
||||
#define CRYPTO_R_TOO_MANY_RECORDS 114
|
||||
#define CRYPTO_R_TOO_SMALL_BUFFER 116
|
||||
#define CRYPTO_R_UNKNOWN_NAME_IN_RANDOM_SECTION 120
|
||||
#define CRYPTO_R_ZERO_LENGTH_NUMBER 115
|
||||
|
||||
#endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user