我正在使用Debian 8(由于各种原因而必须使用),我尝试使用OpenSSL和libp11对文档进行签名。但是当我这样做时,会导致细分错误: 在发现gdb的情况下进行调试
public DateTime LastSyncedLocalTime
{
get;
private set;
}
public DateTime LastSyncedServerTime
{
get;
private set;
}
public DateTime InterpolatedUtcNow
{
get
{
return DateTime.UtcNow + (LastSyncedServerTime - LastSyncedLocalTime);
}
}
public IEnumerator Sync()
{
using (var www = UnityWebRequest.Get("https://nist.time.gov/actualtime.cgi"))
{
yield return www.SendWebRequest();
if (www.isNetworkError || www.isHttpError)
{
Debug.LogError(www.error);
yield break;
}
var timestamp = XElement.Parse(www.downloadHandler.text);
var ticks = long.Parse(timestamp.Attribute(XName.Get("time")).Value) * 10;
LastSyncedLocalTime = DateTime.UtcNow;
LastSyncedServerTime = new DateTime(1970, 1, 1).AddTicks(ticks);
}
}
是最后的通话。到处挖掘,我得到了
Program received signal SIGSEGV, Segmentation fault.
pkcs11_try_pkey_rsa_sign (tbslen=<optimized out>, tbs=<optimized out>,siglen=0x7fffffffe278, sig=<optimized out>, evp_pkey_ctx=0x63a590)
at p11_pkey.c:307
307 slot = KEY2SLOT(key);
是无效的指针(可能已释放)。我在某处读到,pkcs11密钥需要经过身份验证才能使用。但是,如何使用返回的EVP_PKEY *呢?