Lines Matching defs:rsakey
33 struct tr_rsakey_obj *rsakey = calloc(1, sizeof(struct tr_rsakey_obj));
37 if (rsakey == NULL) {
42 if ((result = obj_context_get_policy(tspContext, TSS_POLICY_USAGE, &rsakey->usagePolicy))) {
43 free(rsakey);
50 free(rsakey);
69 rsakey->key.hdr.key11.ver = ver;
70 rsakey->type = TSS_KEY_STRUCT_KEY;
71 rsakey->pcrInfoType = TSS_PCRS_STRUCT_INFO;
72 rsakey->key.keyFlags = 0;
75 rsakey->key.hdr.key12.tag = TPM_TAG_KEY12;
76 rsakey->key.hdr.key12.fill = 0;
77 rsakey->type = TSS_KEY_STRUCT_KEY12;
78 rsakey->pcrInfoType = TSS_PCRS_STRUCT_INFO_LONG;
79 rsakey->key.keyFlags = TPM_PCRIGNOREDONREAD;
82 free(rsakey);
92 rsakey->key.algorithmParms.algorithmID = TCPA_ALG_RSA;
93 rsakey->key.algorithmParms.parmSize = sizeof(TCPA_RSA_KEY_PARMS);
95 rsakey->key.algorithmParms.parms = calloc(1, sizeof(TCPA_RSA_KEY_PARMS));
96 if (rsakey->key.algorithmParms.parms == NULL) {
97 LogError("calloc of %u bytes failed.", rsakey->key.algorithmParms.parmSize);
98 free(rsakey);
104 rsakey->key.pubKey.keyLength = 0;
105 rsakey->key.encSize = 0;
106 rsakey->key.PCRInfoSize = 0;
111 rsakey->key.keyFlags |= TPM_VOLATILE;
113 rsakey->key.keyFlags |= TPM_MIGRATABLE;
115 rsakey->key.authDataUsage = TPM_AUTH_ALWAYS;
121 if (rsakey->type == TSS_KEY_STRUCT_KEY) {
122 free(rsakey);
125 rsakey->key.keyFlags |= TPM_MIGRATEAUTHORITY;
146 rsakey->key.keyUsage = TPM_KEY_SIGNING;
147 rsakey->key.algorithmParms.encScheme = TCPA_ES_NONE;
148 rsakey->key.algorithmParms.sigScheme = TCPA_SS_RSASSAPKCS1v15_SHA1;
150 rsakey->key.keyUsage = TPM_KEY_BIND;
151 rsakey->key.algorithmParms.encScheme = TCPA_ES_RSAESOAEP_SHA1_MGF1;
152 rsakey->key.algorithmParms.sigScheme = TCPA_SS_NONE;
154 rsakey->key.keyUsage = TPM_KEY_LEGACY;
155 rsakey->key.algorithmParms.encScheme = TCPA_ES_RSAESOAEP_SHA1_MGF1;
156 rsakey->key.algorithmParms.sigScheme = TCPA_SS_RSASSAPKCS1v15_SHA1;
158 rsakey->key.keyUsage = TPM_KEY_STORAGE;
159 rsakey->key.algorithmParms.encScheme = TCPA_ES_RSAESOAEP_SHA1_MGF1;
160 rsakey->key.algorithmParms.sigScheme = TCPA_SS_NONE;
162 rsakey->key.keyUsage = TPM_KEY_IDENTITY;
163 rsakey->key.algorithmParms.encScheme = TCPA_ES_NONE;
164 rsakey->key.algorithmParms.sigScheme = TCPA_SS_RSASSAPKCS1v15_SHA1;
166 rsakey->key.keyUsage = TPM_KEY_AUTHCHANGE;
167 rsakey->key.algorithmParms.encScheme = TCPA_ES_RSAESOAEP_SHA1_MGF1;
168 rsakey->key.algorithmParms.sigScheme = TCPA_SS_NONE;
175 Trspi_LoadBlob_RSA_KEY_PARMS(&offset, rsakey->key.algorithmParms.parms, &rsaKeyParms);
176 rsakey->key.algorithmParms.parmSize = offset;
179 if ((result = obj_list_add(&rsakey_list, tspContext, flags, rsakey, phObject))) {
180 free(rsakey->key.algorithmParms.parms);
181 free(rsakey);
188 /* Add a new rsakey to the list when its pulled from user PS */
195 struct tr_rsakey_obj *rsakey = calloc(1, sizeof(struct tr_rsakey_obj));
197 if (rsakey == NULL) {
202 memcpy(&rsakey->uuid, uuid, sizeof(TSS_UUID));
205 if ((result = UnloadBlob_TSS_KEY(&offset, key, &rsakey->key))) {
206 free(rsakey);
209 if (rsakey->key.hdr.key12.tag == TPM_TAG_KEY12)
210 rsakey->type = TSS_KEY_STRUCT_KEY12;
212 rsakey->type = TSS_KEY_STRUCT_KEY;
215 if (rsakey->key.authDataUsage)
218 if ((result = obj_context_get_policy(tspContext, TSS_POLICY_USAGE, &rsakey->usagePolicy))) {
219 free(rsakey);
223 if ((result = obj_list_add(&rsakey_list, tspContext, flags, rsakey, phKey))) {
224 free_key_refs(&rsakey->key);
225 free(rsakey);
249 struct tr_rsakey_obj *rsakey;
260 rsakey = (struct tr_rsakey_obj *)obj->data;
261 rsakey->key.keyFlags = flags;
272 struct tr_rsakey_obj *rsakey;
283 rsakey = (struct tr_rsakey_obj *)obj->data;
284 rsakey->key.pubKey.keyLength = len/8;
295 struct tr_rsakey_obj *rsakey;
306 rsakey = (struct tr_rsakey_obj *)obj->data;
308 free(rsakey->key.algorithmParms.parms);
310 memcpy(&rsakey->key.algorithmParms, parms, sizeof(TCPA_KEY_PARMS));
313 if ((rsakey->key.algorithmParms.parms =
320 memcpy(rsakey->key.algorithmParms.parms, parms->parms,
323 rsakey->key.algorithmParms.parms = NULL;
336 struct tr_rsakey_obj *rsakey;
346 rsakey = (struct tr_rsakey_obj *)obj->data;
350 rsakey->usagePolicy = hPolicy;
353 rsakey->migPolicy = hPolicy;
402 struct tr_rsakey_obj *rsakey;
407 rsakey = (struct tr_rsakey_obj *)obj->data;
409 switch (rsakey->key.keyUsage) {
447 struct tr_rsakey_obj *rsakey;
457 rsakey = (struct tr_rsakey_obj *)obj->data;
461 rsakey->key.keyUsage = TPM_KEY_SIGNING;
464 rsakey->key.keyUsage = TPM_KEY_BIND;
467 rsakey->key.keyUsage = TPM_KEY_LEGACY;
470 rsakey->key.keyUsage = TPM_KEY_AUTHCHANGE;
473 rsakey->key.keyUsage = TPM_KEY_IDENTITY;
476 rsakey->key.keyUsage = TPM_KEY_STORAGE;
492 struct tr_rsakey_obj *rsakey;
503 rsakey = (struct tr_rsakey_obj *)obj->data;
505 rsakey->key.keyFlags |= TPM_MIGRATABLE;
507 rsakey->key.keyFlags &= (~TPM_MIGRATABLE);
518 struct tr_rsakey_obj *rsakey;
529 rsakey = (struct tr_rsakey_obj *)obj->data;
531 rsakey->key.keyFlags |= TPM_REDIRECTION;
533 rsakey->key.keyFlags &= (~TPM_REDIRECTION);
544 struct tr_rsakey_obj *rsakey;
555 rsakey = (struct tr_rsakey_obj *)obj->data;
557 rsakey->key.keyFlags |= TPM_VOLATILE;
559 rsakey->key.keyFlags &= (~TPM_VOLATILE);
570 struct tr_rsakey_obj *rsakey;
575 rsakey = (struct tr_rsakey_obj *)obj->data;
576 *usage = (UINT32)rsakey->key.authDataUsage ? TRUE : FALSE;
587 struct tr_rsakey_obj *rsakey;
598 rsakey = (struct tr_rsakey_obj *)obj->data;
600 rsakey->key.authDataUsage = (BYTE)usage;
615 struct tr_rsakey_obj *rsakey;
620 rsakey = (struct tr_rsakey_obj *)obj->data;
622 switch (rsakey->key.algorithmParms.algorithmID) {
627 *alg = rsakey->key.algorithmParms.algorithmID;
640 struct tr_rsakey_obj *rsakey;
651 rsakey = (struct tr_rsakey_obj *)obj->data;
654 rsakey->key.algorithmParms.algorithmID = TCPA_ALG_RSA;
657 rsakey->key.algorithmParms.algorithmID = alg;
670 struct tr_rsakey_obj *rsakey;
675 rsakey = (struct tr_rsakey_obj *)obj->data;
678 switch (rsakey->key.algorithmParms.encScheme) {
689 *es = rsakey->key.algorithmParms.encScheme;
702 struct tr_rsakey_obj *rsakey;
713 rsakey = (struct tr_rsakey_obj *)obj->data;
718 rsakey->key.algorithmParms.encScheme = TCPA_ES_NONE;
721 rsakey->key.algorithmParms.encScheme = TCPA_ES_RSAESPKCSv15;
724 rsakey->key.algorithmParms.encScheme = TCPA_ES_RSAESOAEP_SHA1_MGF1;
727 rsakey->key.algorithmParms.encScheme = es;
740 struct tr_rsakey_obj *rsakey;
745 rsakey = (struct tr_rsakey_obj *)obj->data;
748 switch (rsakey->key.algorithmParms.sigScheme) {
762 *ss = rsakey->key.algorithmParms.sigScheme;
776 struct tr_rsakey_obj *rsakey;
787 rsakey = (struct tr_rsakey_obj *)obj->data;
792 rsakey->key.algorithmParms.sigScheme = TCPA_SS_NONE;
795 rsakey->key.algorithmParms.sigScheme = TCPA_SS_RSASSAPKCS1v15_SHA1;
798 rsakey->key.algorithmParms.sigScheme = TCPA_SS_RSASSAPKCS1v15_DER;
801 rsakey->key.algorithmParms.sigScheme = TCPA_SS_RSASSAPKCS1v15_INFO;
804 rsakey->key.algorithmParms.sigScheme = ss;
817 struct tr_rsakey_obj *rsakey;
828 rsakey = (struct tr_rsakey_obj *)obj->data;
829 UINT32ToArray(num, &rsakey->key.algorithmParms.parms[4]);
840 struct tr_rsakey_obj *rsakey;
846 rsakey = (struct tr_rsakey_obj *)obj->data;
847 parms = (TCPA_RSA_KEY_PARMS *)rsakey->key.algorithmParms.parms;
859 struct tr_rsakey_obj *rsakey;
864 rsakey = (struct tr_rsakey_obj *)obj->data;
865 *flags = rsakey->key.keyFlags;
876 struct tr_rsakey_obj *rsakey;
881 rsakey = (struct tr_rsakey_obj *)obj->data;
883 switch (rsakey->key.pubKey.keyLength) {
894 *len = rsakey->key.pubKey.keyLength * 8;
927 struct tr_rsakey_obj *rsakey;
933 rsakey = (struct tr_rsakey_obj *)obj->data;
934 if (rsakey->key.keyFlags & TPM_MIGRATABLE)
946 struct tr_rsakey_obj *rsakey;
952 rsakey = (struct tr_rsakey_obj *)obj->data;
953 if (rsakey->key.keyFlags & TPM_REDIRECTION)
965 struct tr_rsakey_obj *rsakey;
971 rsakey = (struct tr_rsakey_obj *)obj->data;
972 if (rsakey->key.keyFlags & TPM_VOLATILE)
999 struct tr_rsakey_obj *rsakey;
1004 rsakey = (struct tr_rsakey_obj *)obj->data;
1006 *mig = rsakey->migPolicy;
1007 *usage = rsakey->usagePolicy;
1008 *auth = rsakey->key.authDataUsage ? TRUE : FALSE;
1020 struct tr_rsakey_obj *rsakey;
1026 rsakey = (struct tr_rsakey_obj *)obj->data;
1030 *phPolicy = rsakey->usagePolicy;
1039 if (!rsakey->migPolicy) {
1044 *phPolicy = rsakey->migPolicy;
1065 struct tr_rsakey_obj *rsakey;
1072 rsakey = (struct tr_rsakey_obj *)obj->data;
1075 LoadBlob_TSS_KEY(&offset, NULL, &rsakey->key);
1085 LoadBlob_TSS_KEY(&offset, *data, &rsakey->key);
1098 struct tr_rsakey_obj *rsakey;
1104 rsakey = (struct tr_rsakey_obj *)obj->data;
1106 *data = calloc_tspi(obj->tspContext, rsakey->key.encSize);
1108 LogError("malloc of %u bytes failed.", rsakey->key.encSize);
1112 *size = rsakey->key.encSize;
1113 memcpy(*data, rsakey->key.encData, rsakey->key.encSize);
1125 struct tr_rsakey_obj *rsakey;
1131 rsakey = (struct tr_rsakey_obj *)obj->data;
1137 if (rsakey->tcsHandle == TPM_KEYHND_SRK) {
1140 if (!memcmp(rsakey->key.pubKey.key, zeroBlob, rsakey->key.pubKey.keyLength)) {
1146 *data = calloc_tspi(obj->tspContext, rsakey->key.pubKey.keyLength);
1148 LogError("malloc of %u bytes failed.", rsakey->key.pubKey.keyLength);
1152 *size = rsakey->key.pubKey.keyLength;
1153 memcpy(*data, rsakey->key.pubKey.key, rsakey->key.pubKey.keyLength);
1165 struct tr_rsakey_obj *rsakey;
1177 rsakey = (struct tr_rsakey_obj *)obj->data;
1179 free_ptr = rsakey->key.pubKey.key;
1181 rsakey->key.pubKey.key = malloc(size);
1182 if (rsakey->key.pubKey.key == NULL) {
1183 rsakey->key.pubKey.key = free_ptr; // restore
1188 rsakey->key.pubKey.keyLength = size;
1189 memcpy(rsakey->key.pubKey.key, data, size);
1201 struct tr_rsakey_obj *rsakey;
1208 rsakey = (struct tr_rsakey_obj *)obj->data;
1214 if (rsakey->tcsHandle == TPM_KEYHND_SRK) {
1217 if (!memcmp(rsakey->key.pubKey.key, zeroBlob, rsakey->key.pubKey.keyLength)) {
1224 Trspi_LoadBlob_KEY_PARMS(&offset, NULL, &rsakey->key.algorithmParms);
1225 Trspi_LoadBlob_STORE_PUBKEY(&offset, NULL, &rsakey->key.pubKey);
1235 Trspi_LoadBlob_KEY_PARMS(&offset, *data, &rsakey->key.algorithmParms);
1236 Trspi_LoadBlob_STORE_PUBKEY(&offset, *data, &rsakey->key.pubKey);
1249 struct tr_rsakey_obj *rsakey;
1257 rsakey = (struct tr_rsakey_obj *)obj->data;
1259 if (rsakey->key.hdr.key12.tag == TPM_TAG_KEY12)
1262 pVer = &rsakey->key.hdr.key11.ver;
1288 struct tr_rsakey_obj *rsakey;
1297 rsakey = (struct tr_rsakey_obj *)obj->data;
1298 parms = (TCPA_RSA_KEY_PARMS *)rsakey->key.algorithmParms.parms;
1334 struct tr_rsakey_obj *rsakey;
1347 rsakey = (struct tr_rsakey_obj *)obj->data;
1348 parms = (TCPA_RSA_KEY_PARMS *)rsakey->key.algorithmParms.parms;
1371 struct tr_rsakey_obj *rsakey;
1378 rsakey = (struct tr_rsakey_obj *)obj->data;
1381 Trspi_LoadBlob_UUID(&offset, NULL, rsakey->uuid);
1391 Trspi_LoadBlob_UUID(&offset, *data, rsakey->uuid);
1404 struct tr_rsakey_obj *rsakey;
1409 rsakey = (struct tr_rsakey_obj *)obj->data;
1410 memcpy(&rsakey->uuid, uuid, sizeof(TSS_UUID));
1437 struct tr_rsakey_obj *rsakey;
1442 rsakey = (struct tr_rsakey_obj *)obj->data;
1443 rsakey->tcsHandle = tcsHandle;
1454 struct tr_rsakey_obj *rsakey;
1460 rsakey = (struct tr_rsakey_obj *)obj->data;
1461 if (rsakey->tcsHandle)
1462 *tcsHandle = rsakey->tcsHandle;
1475 struct tr_rsakey_obj *rsakey;
1482 rsakey = (struct tr_rsakey_obj *)obj->data;
1484 free_key_refs(&rsakey->key);
1487 if ((result = UnloadBlob_TSS_KEY(&offset, data, &rsakey->key)))
1489 if (rsakey->key.hdr.key12.tag == TPM_TAG_KEY12)
1490 rsakey->type = TSS_KEY_STRUCT_KEY12;
1492 rsakey->type = TSS_KEY_STRUCT_KEY;
1494 if (rsakey->key.authDataUsage)
1499 if (rsakey->key.PCRInfoSize && rsakey->key.PCRInfo) {
1501 if (rsakey->type == TSS_KEY_STRUCT_KEY12) {
1502 if ((result = Trspi_UnloadBlob_PCR_INFO_LONG(&offset, rsakey->key.PCRInfo,
1503 &rsakey->pcrInfo.infolong)))
1506 if ((result = Trspi_UnloadBlob_PCR_INFO(&offset, rsakey->key.PCRInfo,
1507 &rsakey->pcrInfo.info11)))
1527 struct tr_rsakey_obj *rsakey;
1535 rsakey = (struct tr_rsakey_obj *)obj->data;
1537 if (pcrInfoType != rsakey->pcrInfoType) {
1545 digest = &rsakey->pcrInfo.info11.digestAtCreation;
1547 digest = &rsakey->pcrInfo.info11.digestAtRelease;
1555 digest = &rsakey->pcrInfo.infolong.digestAtCreation;
1557 digest = &rsakey->pcrInfo.infolong.digestAtRelease;
1590 struct tr_rsakey_obj *rsakey;
1596 rsakey = (struct tr_rsakey_obj *)obj->data;
1598 if (rsakey->pcrInfoType == TSS_PCRS_STRUCT_INFO_LONG) {
1600 *locality = rsakey->pcrInfo.infolong.localityAtCreation;
1602 *locality = rsakey->pcrInfo.infolong.localityAtRelease;
1621 struct tr_rsakey_obj *rsakey;
1629 rsakey = (struct tr_rsakey_obj *)obj->data;
1631 if (pcrInfoType != rsakey->pcrInfoType) {
1639 selection = &rsakey->pcrInfo.info11.pcrSelection;
1647 selection = &rsakey->pcrInfo.infolong.creationPCRSelection;
1649 selection = &rsakey->pcrInfo.infolong.releasePCRSelection;
1679 rsakey_set_pubkey(struct tr_rsakey_obj *rsakey, BYTE *pubkey)
1688 free(rsakey->key.pubKey.key);
1689 free(rsakey->key.algorithmParms.parms);
1691 memcpy(&rsakey->key.pubKey, &pub.pubKey, sizeof(TPM_STORE_PUBKEY));
1692 memcpy(&rsakey->key.algorithmParms, &pub.algorithmParms, sizeof(TPM_KEY_PARMS));
1702 struct tr_rsakey_obj *rsakey;
1708 rsakey = (struct tr_rsakey_obj *)obj->data;
1715 result = rsakey_set_pubkey(rsakey, data);
1727 struct tr_rsakey_obj *rsakey;
1733 rsakey = (struct tr_rsakey_obj *)obj->data;
1736 if (rsakey->tcsHandle == TPM_KEYHND_SRK) {
1737 result = rsakey_set_pubkey(rsakey, pubkey);
1752 struct tr_rsakey_obj *rsakey;
1764 rsakey = (struct tr_rsakey_obj *)obj->data;
1766 to_free = rsakey->key.encData;
1768 rsakey->key.encData = calloc(1, size);
1769 if (rsakey->key.encData == NULL) {
1770 rsakey->key.encData = to_free; // restore
1777 rsakey->key.encSize = size;
1778 memcpy(rsakey->key.encData, data, size);
1789 struct tr_rsakey_obj *rsakey;
1802 rsakey = (struct tr_rsakey_obj *)obj->data;
1810 rsakey->key.PCRInfo = pcrInfo;
1811 rsakey->key.PCRInfoSize = pcrSize;
1821 struct tr_rsakey_obj *rsakey = (struct tr_rsakey_obj *)data;
1823 free(rsakey->key.algorithmParms.parms);
1824 free(rsakey->key.encData);
1825 free(rsakey->key.PCRInfo);
1826 free(rsakey->key.pubKey.key);
1827 free(rsakey);
1830 /* Remove an individual rsakey object from the rsakey list with handle
1848 struct tr_rsakey_obj *rsakey;
1854 rsakey = (struct tr_rsakey_obj *)obj->data;
1856 if (rsakey->key.pubKey.keyLength == pub_size &&
1857 !memcmp(&rsakey->key.pubKey.key, pub, pub_size)) {
1875 struct tr_rsakey_obj *rsakey;
1881 rsakey = (struct tr_rsakey_obj *)obj->data;
1883 if (!memcmp(&rsakey->uuid, uuid, sizeof(TSS_UUID))) {
1901 struct tr_rsakey_obj *rsakey;
1909 rsakey = (struct tr_rsakey_obj *)obj->data;
1910 if (rsakey->usagePolicy == hPolicy)
1911 rsakey->usagePolicy = NULL_HPOLICY;
1913 if (rsakey->migPolicy == hPolicy)
1914 rsakey->migPolicy = NULL_HPOLICY;
1925 struct tr_rsakey_obj *rsakey;
1932 rsakey = (struct tr_rsakey_obj *)obj->data;
1933 *hTCSKey = rsakey->tcsHandle;
1936 result |= Trspi_Hash_STORE_PUBKEY(&hashCtx, &rsakey->key.pubKey);
1950 struct tr_rsakey_obj *rsakey;
1956 rsakey = (struct tr_rsakey_obj *)obj->data;
1957 if (rsakey->type != TSS_KEY_STRUCT_KEY) {
1958 if (rsakey->key.keyFlags & TPM_MIGRATEAUTHORITY)
1971 struct tr_rsakey_obj *rsakey;
1982 rsakey = (struct tr_rsakey_obj *)obj->data;
1983 if (rsakey->type == TSS_KEY_STRUCT_KEY) {
1989 rsakey->key.keyFlags |= TPM_MIGRATEAUTHORITY;
1991 rsakey->key.keyFlags &= (~TPM_MIGRATEAUTHORITY);
2003 struct tr_rsakey_obj *rsakey;
2009 rsakey = (struct tr_rsakey_obj *)obj->data;
2011 if (blobSize != sizeof(rsakey->msaApproval.digest)) {
2015 memcpy(rsakey->msaApproval.digest, blob, sizeof(rsakey->msaApproval.digest));
2027 struct tr_rsakey_obj *rsakey;
2033 rsakey = (struct tr_rsakey_obj *)obj->data;
2035 if ((*blob = calloc_tspi(obj->tspContext, sizeof(rsakey->msaApproval.digest))) == NULL) {
2036 LogError("malloc of %zd bytes failed.", sizeof(rsakey->msaApproval.digest));
2040 memcpy(*blob, rsakey->msaApproval.digest, sizeof(rsakey->msaApproval.digest));
2041 *blobSize = sizeof(rsakey->msaApproval.digest);
2053 struct tr_rsakey_obj *rsakey;
2059 rsakey = (struct tr_rsakey_obj *)obj->data;
2061 if (blobSize != sizeof(rsakey->msaDigest.digest)) {
2065 memcpy(rsakey->msaDigest.digest, blob, sizeof(rsakey->msaDigest.digest));
2077 struct tr_rsakey_obj *rsakey;
2083 rsakey = (struct tr_rsakey_obj *)obj->data;
2085 if ((*blob = calloc_tspi(obj->tspContext, sizeof(rsakey->msaDigest.digest))) == NULL) {
2086 LogError("malloc of %zd bytes failed.", sizeof(rsakey->msaDigest.digest));
2090 memcpy(*blob, rsakey->msaDigest.digest, sizeof(rsakey->msaDigest.digest));
2091 *blobSize = sizeof(rsakey->msaDigest.digest);
2104 struct tr_rsakey_obj *rsakey;
2109 rsakey = (struct tr_rsakey_obj *)obj->data;
2110 *value = rsakey->flags & TSS_RSAKEY_FLAG_OWNEREVICT;
2121 struct tr_rsakey_obj *rsakey;
2126 rsakey = (struct tr_rsakey_obj *)obj->data;
2129 rsakey->flags |= TSS_RSAKEY_FLAG_OWNEREVICT;
2131 rsakey->flags &= ~TSS_RSAKEY_FLAG_OWNEREVICT;