亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? pkcs11-object.c

?? 讀寫Smart卡加解密接口的程序
?? C
?? 第 1 頁 / 共 3 頁
字號(hào):
			  CK_BYTE_PTR       pEncryptedPart,      /* receives encrypted data */			  CK_ULONG_PTR      pulEncryptedPartLen) /* receives encrypted byte count */{        return CKR_FUNCTION_NOT_SUPPORTED;}CK_RV C_DecryptVerifyUpdate(CK_SESSION_HANDLE hSession,            /* the session's handle */			    CK_BYTE_PTR       pEncryptedPart,      /* input encrypted data */			    CK_ULONG          ulEncryptedPartLen,  /* count of byes of input */			    CK_BYTE_PTR       pPart,               /* receives decrypted output */			    CK_ULONG_PTR      pulPartLen)          /* receives decrypted byte count */{        return CKR_FUNCTION_NOT_SUPPORTED;}CK_RV C_GenerateKey(CK_SESSION_HANDLE    hSession,    /* the session's handle */		    CK_MECHANISM_PTR     pMechanism,  /* the key generation mechanism */		    CK_ATTRIBUTE_PTR     pTemplate,   /* template for the new key */		    CK_ULONG             ulCount,     /* number of attributes in template */		    CK_OBJECT_HANDLE_PTR phKey)       /* receives handle of new key */{        return CKR_FUNCTION_NOT_SUPPORTED;}CK_RV C_GenerateKeyPair(CK_SESSION_HANDLE    hSession,                    /* the session's handle */			CK_MECHANISM_PTR     pMechanism,                  /* the key gen. mech. */			CK_ATTRIBUTE_PTR     pPublicKeyTemplate,          /* pub. attr. template */			CK_ULONG             ulPublicKeyAttributeCount,   /* # of pub. attrs. */			CK_ATTRIBUTE_PTR     pPrivateKeyTemplate,         /* priv. attr. template */			CK_ULONG             ulPrivateKeyAttributeCount,  /* # of priv. attrs. */			CK_OBJECT_HANDLE_PTR phPublicKey,                 /* gets pub. key handle */			CK_OBJECT_HANDLE_PTR phPrivateKey)                /* gets priv. key handle */{	struct sc_pkcs11_session *session;	struct sc_pkcs11_slot *slot;        int rv;	rv = sc_pkcs11_lock();	if (rv != CKR_OK)		return rv;        dump_template("C_CreateObject(), PrivKey attrs", pPrivateKeyTemplate, ulPrivateKeyAttributeCount);        dump_template("C_CreateObject(), PubKey attrs", pPublicKeyTemplate, ulPublicKeyAttributeCount);        rv = pool_find(&session_pool, hSession, (void**) &session);	if (rv != CKR_OK)		goto out;	slot = session->slot;	if (slot->card->framework->gen_keypair == NULL) {		rv = CKR_FUNCTION_NOT_SUPPORTED;	} else {		rv = slot->card->framework->gen_keypair(slot->card, slot,			pMechanism, pPublicKeyTemplate, ulPublicKeyAttributeCount,			pPrivateKeyTemplate, ulPrivateKeyAttributeCount,			phPublicKey, phPrivateKey);	}out:	sc_pkcs11_unlock();	return rv;}CK_RV C_WrapKey(CK_SESSION_HANDLE hSession,        /* the session's handle */		CK_MECHANISM_PTR  pMechanism,      /* the wrapping mechanism */		CK_OBJECT_HANDLE  hWrappingKey,    /* handle of the wrapping key */		CK_OBJECT_HANDLE  hKey,            /* handle of the key to be wrapped */		CK_BYTE_PTR       pWrappedKey,     /* receives the wrapped key */		CK_ULONG_PTR      pulWrappedKeyLen)/* receives byte size of wrapped key */{        return CKR_FUNCTION_NOT_SUPPORTED;}CK_RV C_UnwrapKey(CK_SESSION_HANDLE    hSession,          /* the session's handle */		  CK_MECHANISM_PTR     pMechanism,        /* the unwrapping mechanism */		  CK_OBJECT_HANDLE     hUnwrappingKey,    /* handle of the unwrapping key */		  CK_BYTE_PTR          pWrappedKey,       /* the wrapped key */		  CK_ULONG             ulWrappedKeyLen,   /* bytes length of wrapped key */		  CK_ATTRIBUTE_PTR     pTemplate,         /* template for the new key */		  CK_ULONG             ulAttributeCount,  /* # of attributes in template */		  CK_OBJECT_HANDLE_PTR phKey)             /* gets handle of recovered key */{	struct sc_pkcs11_session *session;	struct sc_pkcs11_object *object, *result;	int rv;	rv = sc_pkcs11_lock();	if (rv != CKR_OK)		return rv;	rv = pool_find(&session_pool, hSession, (void**) &session);	if (rv != CKR_OK)		goto out;	rv = pool_find(&session->slot->object_pool, hUnwrappingKey,				(void**) &object);	if (rv != CKR_OK)		goto out;	if (object->ops->sign == NULL_PTR) {                rv = CKR_KEY_TYPE_INCONSISTENT;		goto out;	}	rv = object->ops->unwrap_key(session, object, pMechanism,				pWrappedKey, ulWrappedKeyLen,				pTemplate, ulAttributeCount,				(void **) &result);	sc_debug(context, "Unwrapping result was %d\n", rv);	if (rv == CKR_OK)		rv = pool_insert(&session->slot->object_pool, result, phKey);out:	sc_pkcs11_unlock();	return rv;}CK_RV C_DeriveKey(CK_SESSION_HANDLE    hSession,          /* the session's handle */		  CK_MECHANISM_PTR     pMechanism,        /* the key derivation mechanism */		  CK_OBJECT_HANDLE     hBaseKey,          /* handle of the base key */		  CK_ATTRIBUTE_PTR     pTemplate,         /* template for the new key */		  CK_ULONG             ulAttributeCount,  /* # of attributes in template */		  CK_OBJECT_HANDLE_PTR phKey)             /* gets handle of derived key */{        return CKR_FUNCTION_NOT_SUPPORTED;}CK_RV C_SeedRandom(CK_SESSION_HANDLE hSession,  /* the session's handle */		   CK_BYTE_PTR       pSeed,     /* the seed material */		   CK_ULONG          ulSeedLen) /* count of bytes of seed material */{#ifdef HAVE_OPENSSL	struct sc_pkcs11_session *session;	int rv;	rv = sc_pkcs11_lock();	if (rv != CKR_OK)		return rv;	rv = pool_find(&session_pool, hSession, (void**) &session);	if (rv == CKR_OK)		rv = sc_pkcs11_openssl_add_seed_rand(session, pSeed, ulSeedLen);	sc_pkcs11_unlock();	return rv;#else	return CKR_FUNCTION_NOT_SUPPORTED;#endif}CK_RV C_GenerateRandom(CK_SESSION_HANDLE hSession,    /* the session's handle */		       CK_BYTE_PTR       RandomData,  /* receives the random data */		       CK_ULONG          ulRandomLen) /* number of bytes to be generated */{#ifdef HAVE_OPENSSL	struct sc_pkcs11_session *session;	int rv;	rv = sc_pkcs11_lock();	if (rv != CKR_OK)		return rv;	rv = pool_find(&session_pool, hSession, (void**) &session);	if (rv == CKR_OK)		rv = sc_pkcs11_openssl_add_gen_rand(session, RandomData, ulRandomLen);	sc_pkcs11_unlock();	return rv;#else	return CKR_FUNCTION_NOT_SUPPORTED;#endif}CK_RV C_GetFunctionStatus(CK_SESSION_HANDLE hSession) /* the session's handle */{        return CKR_FUNCTION_NOT_SUPPORTED;}CK_RV C_CancelFunction(CK_SESSION_HANDLE hSession) /* the session's handle */{        return CKR_FUNCTION_NOT_SUPPORTED;}CK_RV C_VerifyInit(CK_SESSION_HANDLE hSession,    /* the session's handle */		   CK_MECHANISM_PTR  pMechanism,  /* the verification mechanism */		   CK_OBJECT_HANDLE  hKey)        /* handle of the verification key */{#ifndef HAVE_OPENSSL	return CKR_FUNCTION_NOT_SUPPORTED;#else#if 0        CK_BBOOL can_verify;	CK_ATTRIBUTE verify_attribute = { CKA_VERIFY, &can_verify, sizeof(can_verify) };#endif	CK_KEY_TYPE key_type;	CK_ATTRIBUTE key_type_attr = { CKA_KEY_TYPE, &key_type, sizeof(key_type) };	struct sc_pkcs11_session *session;	struct sc_pkcs11_object *object;        int rv;	rv = sc_pkcs11_lock();	if (rv != CKR_OK)		return rv;	rv = pool_find(&session_pool, hSession, (void**) &session);	if (rv != CKR_OK)		goto out;	rv = pool_find(&session->slot->object_pool, hKey, (void**) &object);	if (rv != CKR_OK)		goto out;#if 0	rv = object->ops->get_attribute(session, object, &verify_attribute);        if (rv != CKR_OK || !can_verify) {                rv = CKR_KEY_TYPE_INCONSISTENT;		goto out;	}#endif	rv = object->ops->get_attribute(session, object, &key_type_attr);        if (rv != CKR_OK) {                rv = CKR_KEY_TYPE_INCONSISTENT;		goto out;	}	rv = sc_pkcs11_verif_init(session, pMechanism, object, key_type);out:	sc_debug(context, "Verify initialization returns %d\n", rv);	sc_pkcs11_unlock();        return rv;#endif}CK_RV C_Verify(CK_SESSION_HANDLE hSession,       /* the session's handle */	       CK_BYTE_PTR       pData,          /* plaintext data (digest) to compare */	       CK_ULONG          ulDataLen,      /* length of data (digest) in bytes */	       CK_BYTE_PTR       pSignature,     /* the signature to be verified */	       CK_ULONG          ulSignatureLen) /* count of bytes of signature */{#ifndef HAVE_OPENSSL	return CKR_FUNCTION_NOT_SUPPORTED;#else        int rv;	struct sc_pkcs11_session *session;	rv = sc_pkcs11_lock();	if (rv != CKR_OK)		return rv;	rv = pool_find(&session_pool, hSession, (void**) &session);	if (rv != CKR_OK)		goto out;	rv = sc_pkcs11_verif_update(session, pData, ulDataLen);	if (rv == CKR_OK)		rv = sc_pkcs11_verif_final(session, pSignature, ulSignatureLen);out:	sc_debug(context, "Verify result was %d\n", rv);	sc_pkcs11_unlock();        return rv;#endif}CK_RV C_VerifyUpdate(CK_SESSION_HANDLE hSession,  /* the session's handle */		     CK_BYTE_PTR       pPart,     /* plaintext data (digest) to compare */		     CK_ULONG          ulPartLen) /* length of data (digest) in bytes */{#ifndef HAVE_OPENSSL	return CKR_FUNCTION_NOT_SUPPORTED;#else	struct sc_pkcs11_session *session;        int rv;	rv = sc_pkcs11_lock();	if (rv != CKR_OK)		return rv;	rv = pool_find(&session_pool, hSession, (void**) &session);	if (rv == CKR_OK)		rv = sc_pkcs11_verif_update(session, pPart, ulPartLen);	sc_debug(context, "C_VerifyUpdate returns %d\n", rv);	sc_pkcs11_unlock();        return rv;#endif}CK_RV C_VerifyFinal(CK_SESSION_HANDLE hSession,       /* the session's handle */		    CK_BYTE_PTR       pSignature,     /* the signature to be verified */		    CK_ULONG          ulSignatureLen) /* count of bytes of signature */{#ifndef HAVE_OPENSSL	return CKR_FUNCTION_NOT_SUPPORTED;#else	struct sc_pkcs11_session *session;        int rv;	rv = sc_pkcs11_lock();	if (rv != CKR_OK)		return rv;	rv = pool_find(&session_pool, hSession, (void**) &session);	if (rv != CKR_OK)		goto out;	rv = sc_pkcs11_verif_final(session, pSignature, ulSignatureLen);out:	sc_debug(context, "C_VerifyFinal returns %d\n", rv);	sc_pkcs11_unlock();        return rv;#endif}CK_RV C_VerifyRecoverInit(CK_SESSION_HANDLE hSession,    /* the session's handle */			  CK_MECHANISM_PTR  pMechanism,  /* the verification mechanism */			  CK_OBJECT_HANDLE  hKey)        /* handle of the verification key */{        return CKR_FUNCTION_NOT_SUPPORTED;}CK_RV C_VerifyRecover(CK_SESSION_HANDLE hSession,        /* the session's handle */		      CK_BYTE_PTR       pSignature,      /* the signature to be verified */		      CK_ULONG          ulSignatureLen,  /* count of bytes of signature */		      CK_BYTE_PTR       pData,           /* receives decrypted data (digest) */		      CK_ULONG_PTR      pulDataLen)      /* receives byte count of data */{        return CKR_FUNCTION_NOT_SUPPORTED;}/* * Helper function to compare attributes on any sort of object */intsc_pkcs11_any_cmp_attribute(struct sc_pkcs11_session *session,		void *ptr, CK_ATTRIBUTE_PTR attr){	struct sc_pkcs11_object *object;	u8		temp[1024];	CK_ATTRIBUTE	temp_attr;	int		rv;	object = (struct sc_pkcs11_object *) ptr;	temp_attr.type = attr->type;	temp_attr.pValue = temp;	temp_attr.ulValueLen = sizeof(temp);	rv = object->ops->get_attribute(session, object, &temp_attr);	if (rv != CKR_OK)		return 0;#ifdef DEBUG	{		char	foo[64];		snprintf(foo, sizeof(foo), "Object %p (slot %d)",				object, session->slot->id);		dump_template(foo, &temp_attr, 1);	}#endif	return temp_attr.ulValueLen == attr->ulValueLen	    && !memcmp(temp, attr->pValue, attr->ulValueLen);}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本sm残虐另类| 一片黄亚洲嫩模| 国产成人免费9x9x人网站视频| 欧美成人女星排行榜| 激情六月婷婷综合| 国产日韩综合av| 91麻豆国产香蕉久久精品| 亚洲另类春色校园小说| 欧美三级日本三级少妇99| 亚洲成av人片一区二区| 日韩亚洲欧美高清| 成人免费精品视频| 香蕉成人伊视频在线观看| 日韩一二在线观看| 成人app网站| 亚洲一区二区三区自拍| 欧美一区二区三区色| 国产成人99久久亚洲综合精品| 日韩一区在线免费观看| 欧美日韩成人激情| 国产一区二区中文字幕| 中文字幕一区二区三区在线不卡| 91福利在线导航| 成人三级伦理片| 一区二区三区资源| 欧美一区二区久久久| 国产91露脸合集magnet| 午夜a成v人精品| 久久久久久久精| 欧美伦理影视网| 成人黄页毛片网站| 日本不卡一区二区三区高清视频| 国产欧美精品日韩区二区麻豆天美| 日本韩国欧美在线| 国产91精品久久久久久久网曝门 | 韩国av一区二区三区四区| 国产精品国产自产拍高清av王其| 91精品国产综合久久久久久| 99精品欧美一区二区三区综合在线| 免费在线视频一区| 亚洲综合小说图片| 亚洲欧洲无码一区二区三区| 日韩精品专区在线影院观看| 欧美三级视频在线| 91啪在线观看| 国产91精品一区二区| 久久精品久久综合| 亚洲第一主播视频| 亚洲欧洲一区二区三区| 久久久久久电影| 欧美大片在线观看一区二区| 欧美日韩视频一区二区| 91色.com| 成人黄色软件下载| 国产一区二区剧情av在线| 青青草一区二区三区| 亚洲一区二区四区蜜桃| 中文字幕一区二区三区在线不卡| 久久精品一二三| 久久综合九色综合欧美98| 91精品婷婷国产综合久久竹菊| 欧美性猛片xxxx免费看久爱| 91毛片在线观看| 97精品超碰一区二区三区| 成人av免费网站| 成人国产一区二区三区精品| 成人午夜av电影| 99久久婷婷国产精品综合| 国产美女精品在线| 国产毛片精品一区| 国产一区二区三区观看| 国产在线精品免费| 国产福利精品一区| 国产一区二区三区黄视频| 九色综合国产一区二区三区| 久久国产精品免费| 韩国视频一区二区| 国内成+人亚洲+欧美+综合在线| 麻豆国产精品官网| 精品一区二区三区在线观看| 经典三级在线一区| 国产乱子轮精品视频| 国产精品12区| 99在线精品视频| 99久久免费视频.com| 欧美成人国产一区二区| 日韩欧美久久久| 久久色中文字幕| 国产午夜一区二区三区| 国产精品乱码一区二区三区软件 | 日韩成人av影视| 日韩福利视频导航| 极品美女销魂一区二区三区免费| 国产乱色国产精品免费视频| 国产91在线|亚洲| 91麻豆福利精品推荐| 欧美性生活一区| 精品sm在线观看| 综合激情网...| 日韩电影在线观看一区| 国产乱子伦一区二区三区国色天香| 成人av电影免费观看| 欧美日韩电影一区| 久久综合色8888| 亚洲九九爱视频| 奇米在线7777在线精品| 国内一区二区视频| 久久影音资源网| 亚洲天堂精品视频| 亚洲视频图片小说| 亚洲综合一区二区精品导航| 免费高清成人在线| www.视频一区| 欧美三级在线看| 国产日韩高清在线| 精品国产成人系列| 国产精品进线69影院| 欧美国产精品中文字幕| 亚洲图片一区二区| 91丨九色丨尤物| 亚洲欧洲精品天堂一级| 国产成人综合精品三级| 久久夜色精品国产噜噜av| 美腿丝袜亚洲综合| 欧美一区二区三区公司| 亚洲成国产人片在线观看| 色婷婷亚洲精品| 亚洲精品老司机| 久久亚洲春色中文字幕久久久| 久久国产精品72免费观看| 日韩欧美第一区| 韩国av一区二区| 久久久九九九九| 成人av网址在线| 最新不卡av在线| 91丨porny丨国产入口| 亚洲三级在线免费| 在线精品视频一区二区三四| 亚洲国产欧美日韩另类综合| 欧美日韩免费一区二区三区| 午夜精品123| 日韩一二三区不卡| 国产在线日韩欧美| 国产香蕉久久精品综合网| 国产成人免费xxxxxxxx| 中文字幕中文字幕中文字幕亚洲无线| jlzzjlzz亚洲日本少妇| 尤物在线观看一区| 欧美日韩免费一区二区三区视频| 日韩国产欧美三级| 久久你懂得1024| 99re热视频精品| 亚洲一二三专区| 欧美大黄免费观看| 国产高清精品久久久久| 亚洲视频一二三区| 9191成人精品久久| 国产乱码字幕精品高清av| 最新国产成人在线观看| 欧美日韩免费视频| 国产揄拍国内精品对白| 国产精品久久二区二区| 欧美日韩国产美女| 精品午夜久久福利影院| 亚洲欧洲日韩女同| 欧美一区二区视频在线观看| 高清shemale亚洲人妖| 一区二区三区中文字幕电影| 日韩一区二区免费视频| 成人污污视频在线观看| 五月婷婷激情综合网| 久久老女人爱爱| 91热门视频在线观看| 麻豆专区一区二区三区四区五区| 国产欧美精品一区二区三区四区| 在线日韩国产精品| 在线精品视频小说1| 激情六月婷婷久久| 亚洲综合色网站| 久久久一区二区三区捆绑**| 91猫先生在线| 国产精品一区一区| 亚洲一区二区成人在线观看| 26uuu国产一区二区三区| 色综合久久66| 国产精品一二三区在线| 亚洲午夜免费电影| 国产日产欧美精品一区二区三区| 欧美日韩免费一区二区三区| 成人免费黄色大片| 热久久一区二区| 一区二区三区四区国产精品| 久久综合久色欧美综合狠狠| 欧美日韩成人在线| 91啪亚洲精品| 国产成人在线观看免费网站| 天堂成人免费av电影一区| 国产精品国产三级国产aⅴ中文| 精品国产乱码久久久久久久久 | 亚洲一区二区三区四区不卡|