mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-08-10 07:53:57 +08:00
add zeromem engine
anti memory leakage attack
This commit is contained in:
22
engines/zeromem/sys_ec2m.c
Executable file
22
engines/zeromem/sys_ec2m.c
Executable file
@@ -0,0 +1,22 @@
|
||||
#include <unistd.h>
|
||||
#include "sys_ec2m.h"
|
||||
|
||||
int sys_ec2m_alloc(void)
|
||||
{
|
||||
return syscall(__NR_ec2m_alloc);
|
||||
}
|
||||
|
||||
int sys_ec2m_free(int rid)
|
||||
{
|
||||
return syscall(__NR_ec2m_free, rid);
|
||||
}
|
||||
|
||||
int sys_ec2m_setkey(int rid, mm_256* key, int a, int b)
|
||||
{
|
||||
return syscall(__NR_ec2m_setkey, rid, (void*)key, a, b);
|
||||
}
|
||||
|
||||
int sys_ec2m_encrypt(int rid, mm256_point_t* bufin, mm256_point_t* bufout)
|
||||
{
|
||||
return syscall(__NR_ec2m_encrypt, rid, (void*)bufin, (void*)bufout);
|
||||
}
|
||||
Reference in New Issue
Block a user