Skip to content

Commit e405399

Browse files
Remove no-mangle
1 parent 19e448c commit e405399

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

boringtun/src/jni.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ pub extern "C" fn log_print(_log_string: *const c_char) {
3535
}
3636

3737
/// Generates new x25519 secret key and converts into java byte array.
38-
#[no_mangle]
3938
#[export_name = "Java_com_cloudflare_app_boringtun_BoringTunJNI_x25519_1secret_1key"]
4039
pub extern "C" fn generate_secret_key(env: JNIEnv, _class: JClass) -> jbyteArray {
4140
match env.byte_array_from_slice(&x25519_secret_key().key) {
@@ -45,7 +44,6 @@ pub extern "C" fn generate_secret_key(env: JNIEnv, _class: JClass) -> jbyteArray
4544
}
4645

4746
/// Computes public x25519 key from secret key and converts into java byte array.
48-
#[no_mangle]
4947
#[export_name = "Java_com_cloudflare_app_boringtun_BoringTunJNI_x25519_1public_1key"]
5048
pub unsafe extern "C" fn generate_public_key1(
5149
env: JNIEnv,
@@ -72,7 +70,6 @@ pub unsafe extern "C" fn generate_public_key1(
7270
}
7371

7472
/// Converts x25519 key to hex string.
75-
#[no_mangle]
7673
#[export_name = "Java_com_cloudflare_app_boringtun_BoringTunJNI_x25519_1key_1to_1hex"]
7774
pub unsafe extern "C" fn convert_x25519_key_to_hex(
7875
env: JNIEnv,
@@ -98,7 +95,6 @@ pub unsafe extern "C" fn convert_x25519_key_to_hex(
9895
}
9996

10097
/// Converts x25519 key to base64 string.
101-
#[no_mangle]
10298
#[export_name = "Java_com_cloudflare_app_boringtun_BoringTunJNI_x25519_1key_1to_1base64"]
10399
pub unsafe extern "C" fn convert_x25519_key_to_base64(
104100
env: JNIEnv,
@@ -125,7 +121,6 @@ pub unsafe extern "C" fn convert_x25519_key_to_base64(
125121
}
126122

127123
/// Creates new tunnel
128-
#[no_mangle]
129124
#[export_name = "Java_com_cloudflare_app_boringtun_BoringTunJNI_new_1tunnel"]
130125
pub unsafe extern "C" fn create_new_tunnel(
131126
env: JNIEnv,
@@ -171,7 +166,6 @@ pub unsafe extern "C" fn create_new_tunnel(
171166
}
172167

173168
/// Encrypts raw IP packets into WG formatted packets.
174-
#[no_mangle]
175169
#[export_name = "Java_com_cloudflare_app_boringtun_BoringTunJNI_wireguard_1write"]
176170
pub unsafe extern "C" fn encrypt_raw_packet(
177171
env: JNIEnv,
@@ -206,7 +200,6 @@ pub unsafe extern "C" fn encrypt_raw_packet(
206200
}
207201

208202
/// Decrypts WG formatted packets into raw IP packets.
209-
#[no_mangle]
210203
#[export_name = "Java_com_cloudflare_app_boringtun_BoringTunJNI_wireguard_1read"]
211204
pub unsafe extern "C" fn decrypt_to_raw_packet(
212205
env: JNIEnv,
@@ -242,7 +235,6 @@ pub unsafe extern "C" fn decrypt_to_raw_packet(
242235
}
243236

244237
/// Periodic function that writes WG formatted packets into destination buffer
245-
#[no_mangle]
246238
#[export_name = "Java_com_cloudflare_app_boringtun_BoringTunJNI_wireguard_1tick"]
247239
pub unsafe extern "C" fn run_periodic_task(
248240
env: JNIEnv,

0 commit comments

Comments
 (0)