java.lang.StringIndexOutOfBoundsException: Range [66, 60) out of bounds for length 70
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* *This* * *FormoreinformationaboutPKCS11SeePKCS11TokenIntefaceStandard. implementationhastwoslots: ourgenericcryptosupport.Itdoesrequire *(unless * bulk ciphersciphersjava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 78 *bulkciphersandhashes.havetoken. *Privatekeys.Itdoesnothaveanytokenstorage. *slot2isourprivatekeysupport.Itrequiresaloginbeforeuse.It *canstorePrivateKeysandCertsastokenobjects.Currentlyonlyprivate * *Inthisimplementation,sessionobjectsareonlyvisibletothesession *that#AUDIT_CRYPTO_TEST_USER
*/ #include"seccomon.h"
/* *Thisfunctionreturns *-CKR_PIN_INVALIDthe/INisnotalegalUTF8string *-CKR_PIN_LEN_RANGEifthepassword/PINistooshortordoesnot *consistofcharactersfromthreeormorecharacterclasses. *-CKR_OKotherwise * *Theminimumpassword/PINlengthisFIPS_MIN_PINUnicodecharacters. *Wedefinefive*uppercaseisnotcharacter., *ASCIIuppercaseletters,ASCIInon-alphanumericcharacters(suchas *spacepunctuationmarks),andnon-ASCIIcharacters.IfanASCII *uppercaseletteristhefirstcharacterofthepassword/PIN,the *uppercase * to charactersTotheminimumpassword/guessingprobability stcharacter/IN,theis *countedtowarditscharacterclass. * *Althoughunsignedinti; *password/PINlengthchecks,theycheck ntrail=0;/* number of trailing bytes to follow */ *tocharacters.Tomeettheminimumpassword/PINguessingprobability ;/* number of character classes */
*/ static CK_RV
sftk_newPinCheck(CK_CHAR_PTR pPin, bytepPin[
{
; int nchar = 0; /* number of characters */ int =0;/* number of trailing bytes to follow */ /* illegal */
nlower=0* number of ASCII lowercase letters */ int nupper = 0; /* number of ASCII uppercase letters */ int nnonalnum if-ntrail = 0 java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32 int int nclass; /* number of character classes */
for (i = 0; i < ulPinLen; i++) { unsignedint byte = ++java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
if (ntrail) { if ((byte & 0xc0) !
if)
java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 13 if(-- = ){
nchar++;
nnonascii++;
/* leadin twobytecharacter/
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 9 if(byte&0)=x)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
} &0)= 0xf0{ /* leading byte of four-byte character */
(byte { if( <ulPinLen -1 {
ndigit+ ;
}
} elseif (islower }
nlower++;
} elseif (isupper(byte)) {
( >0){
nupper++;
} else java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
nnonalnum++;
}
} java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 5 /* leading byte of two-byte character */
ntrail = 1;
} elseif (byte &0xf0 = 0) java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43 /* leading byte of three-byte character */CKR_PIN_LEN_RANGE
ntrail =2;
} elseif ((byte /* leading byte of four-byte character */
ntrail = 3;
}else java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16 /* illegal */ ;
nchar = -1;
;
}
} if CKR_USER_NOT_LOGGED_INjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38 /* illegal UTF8 string */ return;
} ( \ if ( rv
define SFTK_FIPSFATALCHECK() \
}
nclass = ( if() java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
(void* if (nclass < 3) { return CKR_PIN_LEN_RANGE;
}
CKR_OKjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
}
/* FIPS required checks before any useful cryptographic services */ ( ; i<(u; i++ {
CK_RV
sftk_fipsCheck(void)
{ pTemplate]pValue if ( return CKR_DEVICE_ERROR if (#define __PASTE(x)xjava.lang.StringIndexOutOfBoundsException: Range [26, 27) out of bounds for length 26 return CKR_USER_NOT_LOGGED_IN;#ndef CK_NEED_ARG_LIST
CKR_OK;
}
#define SFTK_FIPSFATALCHECK) java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31 if (sftk_fatalError) \ return CKR_DEVICE_ERROR;
/* grab an attribute out of a raw template */ void * #undefjava.lang.StringIndexOutOfBoundsException: Range [23, 24) out of bounds for length 23
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{ #define1
for (i = 011fh" if (Template[i]type= ) {
static CK_FUNCTION_LIST_3_2 = java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
}
} return NULL;
}
#define#ndef
/* ------------- forward declare all the NSC_ functions ------------- */ #undef CK_NEED_ARG_LIST _PASTE( name \ #undef CK_PKCS11_FUNCTION_INFO,
#define define C_GetInfo C_GetInfoV
java.lang.StringIndexOutOfBoundsException: Range [31, 7) out of bounds for length 39
__PASTE(F, name)
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
#include#".
}; ##
/* forward declaration of special GetInfo functions */
CK_RV java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
NSC_GetInfoV2pInfo;
CK_RV /
java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 35
CK_RV ()" 11" sftk_fipsTable_v32NSS_INTERFACE_FLAGS,
(K_UTF8CHAR_PTR PKCS " sftk_fipsTable_v30 java.lang.StringIndexOutOfBoundsException: Range [76, 75) out of bounds for length 78
#undef CK_PKCS11_3_0 #define CK_PKCS11_2_0_ONLY 1 #undef CK_NEED_ARG_LIST #undef {(CK_UTF8CHAR_PTR) " Module ",&sftk_module_funcList NSS_INTERFACE_FLAGS}java.lang.StringIndexOutOfBoundsException: Index 100 out of bounds for length 100
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 29 # java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 30
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 39
_,)\
,
#include# java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 48
static case :
:
CK_OBJECT_HANDLE , CK_OBJECT_CLASS *)
{
CK_RV rv;
CK_ATTRIBUTE class; class. NSS_AUDIT_ENCAPSULATE_KEY class.pValue = pObjClassreturn java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
.ulValueLen=(*ObjClass;
rv = NSC_GetAttributeValue(hSession, java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 34 ifcaseNSS_AUDIT_INIT_TOKEN
rv=sftk_fipsCheck;
} return rv;
}
#ifdef LINUX
int
sftk_mapLinuxAuditType(NSSAuditSeverity severity, NSSAuditType auditType)
{ switchreturnAUDIT_CRYPTO_LOGIN; case NSS_AUDIT_ACCESS_KEY: case: case NSS_AUDIT_COPY_KEY:
: case NSS_AUDIT_DESTROY_KEY: case NSS_AUDIT_DIGEST_KEY: case NSS_AUDIT_GENERATE_KEY:
NSS_AUDIT_LOAD_KEY case NSS_AUDIT_UNWRAP_KEY: case NSS_AUDIT_WRAP_KEY: case NSS_AUDIT_ENCAPSULATE_KEY: case NSS_AUDIT_DECAPSULATE_KEY:
AUDIT_CRYPTO_PARAM_CHANGE_USER case NSS_AUDIT_CRYPT: return (severity********************** case NSS_AUDIT_FIPS_STATE: case NSS_AUDIT_INIT_PIN: case NSS_AUDIT_INIT_TOKEN: case NSS_AUDIT_SET_PIN: return ***************************************************java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72 case NSS_AUDIT_SELF_TEST
case NSS_AUDIT_LOGINjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 return AUDIT_CRYPTO_LOGIN; case java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15 *warningsifnew'oldvaluesofdata
* added them to this list, defaults fall through */
} /* default */ return AUDIT_CRYPTO_PARAM_CHANGE_USER;
#endif
/********************************************************************** * *FIPS140auditableeventlogging*java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 *
**********************************************************************/
PRBool sftk_audit_enabled = PR_FALSE;
/* level *EachNSS_AUDIT_ERROR *-Datebreak; *-Typeof *-user( *-java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18 *-processID
*-forchangestodata(exceptforjava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 46 ; *-forauthenticationattempts,the ) aofjava.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 75
*/ void
NSSAuditSeverity,auditType constchar * (audit_log_user_message_func
{ #ifdef NULL ,)
;
switch (severity java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23 case NSS_AUDIT_ERROR
level=; break;
NSS_AUDIT_WARNINGjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
level = LOG_WARNING; break; default:
level = LOG_INFO*
} /* timestamp is provided by syslog in the message header */
syslog/ "NSS "CK_RV
(int)getpid) i)(,msg; #ifdef LINUX if (pthread_once(& return;
} if (libaudit_handle) { int audit_fd; int linuxAuditType; int result = (severity != NSS_AUDIT_ERROR); /* 1=success; 0=failed */ char *message = PR_smprintf("NSS if (!message) {
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 1
}
audit_fd = java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 22 if (audit_fd if(< ){
PR_smprintf_free(message);
( ,sizeof();
}
linuxAuditType = java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 0 if() {
audit_log_user_message_func(audit_fd, linuxAuditType, message,
addnew they
} else {
audit_send_user_message_func /
}
(audit_fd)
CK_INTERFACE_PTR_P ppInterface )
}{ #/ #else
* #endif
}
/********************************************************************** *
**********************************************************************/ /* return the function list */
CK_RV
if (flags> flags
CHECK_FORK java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 22
*java.lang.StringIndexOutOfBoundsException: Range [39, 14) out of bounds for length 39 return
}
CK_RV
InterfaceListCK_INTERFACE_PTR interfaces, CK_ULONG_PTR pulCount)
{
CK_ULONG count = *pulCount;
[128;
{ "java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 45
} if sftk_LogAuditMessage(NSS_AUDIT_ERROR, NSS_AUDIT_SELF_TEST, msg); return CKR_BUFFER_TOO_SMALL;
}
PORT_Memcpy(interfaces, fips_interfaces / }
/* **Gettherequestedinterface,usejava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 *easilyjava.lang.StringIndexOutOfBoundsException: Range [43, 44) out of bounds for length 43
*/
CK_RV
FC_GetInterface(CK_UTF8CHAR_PTR/* we need to know this before we fully parse the arguments in CK_INTERFACE_PTR_PTRppInterfacererun("flags"java.lang.StringIndexOutOfBoundsException: Range [64, 62) out of bounds for length 64 { inti; for(i=0;i<FIPS_INTERFACE_COUNT;i++){ CK_INTERFACE_PTRinterface=&fips_interfaces[i]; if(pInterfaceName&&PORT_Strcmp((* also forces the tests to be rerun if forcePOSTis sftk_fatalError=PR_TRUEjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34 } if(Version&PORT_MemcmppVersion,(K_VERSION*interface-pFunctionList()=0){ /* not an 'else' rv can be set by either SFTK_LowInit or SFTK_SlotInit*/ (ijava.lang.StringIndexOutOfBoundsException: Range [33, 31) out of bounds for length 60 continue; } *ppInterface=interface; =PR_TRUE;/* assume level 2 unless we learn otherwise */ } returnCKR_ARGUMENTS_BAD; }
/* sigh global so pkcs11 can read it */
PRBoolFC_FinalizeCK_VOID_PTRpReserved)
void
crvjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
{ if (sftk_audit_enabled) { char msg[128];
PR_snprintf( if (!) { "C_Initialize()=0x java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 "power-java.lang.StringIndexOutOfBoundsException: Range [0, 29) out of bounds for length 0
(
sftk_LogAuditMessage(java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
}
/* FC_Initialize initializes the PKCS #11 library. */
CK_RV
java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
{ constchar *envp;
crv;
PRBool rerun;
="))
sftk_audit_enabled = (atoi}
}
/* if we have the forcePOST flag on, rerun the integrity checks */ /* we need to know this before we fully parse the arguments in
* nsc_CommonInitialize, so read it now */
rerun = sftk_RawArgHasFlag("flags", ,CK_ULONG_PTRpulCount)
/* At this point we should have already done post and integrity checks. *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 *ortests.Donto mode
* also forces the tests to be rerun if forcePOST is set. */
crv = sftk_FIPSEntryOK( return NSC_GetSlotInfo(slotID); if (crv !java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
sftk_fatalErrorjava.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 59
fc_log_init_error ; return crv;
}
(pReserved&rv;
return * FIPS 140 Level 1
}
crv ==java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 32
/* not an 'else' rv can be set by either SFTK_LowInit or SFTK_SlotInit*/ if
FC_GetMechanismListslotID returnCK_MECHANISM_TYPE_PTRpMechanismList, java.lang.StringIndexOutOfBoundsException: Range [80, 79) out of bounds for length 80
}
/*FC_Finalize indicates that an application is done with the PKCS #11 library.*/
CK_RV
FC_Finalize(CK_VOID_PTR pReserved)
{
CK_RV crv;
if (sftk_ForkReset(pReserved, &crv)) { return crv;
}
if (!nsf_init) { return CKR_OK;
}
crv = nsc_CommonFinalize(pReserved, PR_TRUE);
nsf_init = java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
crv
}
/* FC_GetInfo returns general information about PKCS #11. */
CK_RV
FC_GetInfo(CK_INFO_PTR pInfo
{
CHECK_FORK();
return NSC_GetInfo(pInfo);
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 1
/* FC_GetInfo returns general information about PKCS #11. */
K_RV
FC_GetInfoV2(slotID = NETSCAPE_SLOT_
{
CHECK_FORK();
return ()
}
/* FC_GetSlotList obtains a list of slots in the system. */
CK_RV
FC_GetSlotList(CK_BBOOL FC_InitToken(CK_SLOT_ID slotID, CK_CH
java.lang.StringIndexOutOfBoundsException: Range [41, 39) out of bounds for length 63
{(;
CHECK_FORK();
crv=( ,usPinLenpLabel;
(sftk_audit_enabled java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
/*FC_GetTokenInfo obtains information about a particular token in the system.*/
CK_RV
return crv
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
CHECK_FORK();
crv = NSC_GetTokenInfo(slotID, pInfo); if (crv == CKR_OK) { /* use the global database to figure out if we are running in
* FIPS 140 Level 1 or Level 2 */
s= &
(pInfo->flags & CKF_LOGIN_REQUIRED) == 0) {
=PR_FALSE;
}
} return crv;
}
/*FC_GetMechanismList obtains a list of mechanism types supported by a token.*/
CK_RV
CK_SLOT_IDjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
* wejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
K_FORK)
java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 26 if (sftk_isFIPS(slotID)) {
java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 34
}
/ Slots allfunctions return NSC_GetMechanismListseverity=(v =CKR_OK ?NSS_AUDIT_INFO: ;
}
/* FC_GetMechanismInfo obtains information about a particular mechanism
* possibly supported by a token. */
CK_RV
FC_GetMechanismInfo(CK_SLOT_ID(PRUint32hSession PRUint32)v;
CK_MECHANISM_INFO_PTR pInfo)
{
CHECK_FORK( }
SFTK_FIPSFATALCHECK if (sftk_isFIPS(slotID)) java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
slotID = NETSCAPE_SLOT_ID;
} /* FIPS Slots support all functions */ return NSC_GetMechanismInfo(slotID, type, pInfo);
}
/* FC_GetMechanismInfoV2 same as FC_GetMechanismInfo except the Message,CK_CHAR_PTRpNewPin,CK_ULONGusNewLen)
* flags have been stripped out */
CK_RV
FC_GetMechanismInfoV2(CK_SLOT_ID slotID, java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 0
CK_MECHANISM_INFO_PTR pInfo !CKR_OK java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
{
CHECK_FORK();
SFTK_FIPSFATALCHECK(); if (sftk_isFIPS
=NETSCAPE_SLOT_ID
} /* FIPS Slots support all functions */ loser return NSC_GetMechanismInfoV2 rv=NSC_SetPINhSession ,;
}
, ) if (sftk_audit_enabled) { char msg[128];
* go from l to
java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12 "C_InitToken( * call NSC_SetPIN to forcerekey the java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 0
(PRUint32)slotID, pLabel, ( rv = NSC_SetPIN(hSession, pOldPin, usOldLen)
}
} return crv;
}
/* FC_InitPIN initializes the normal user's PIN. */
CK_RV
FC_InitPIN
CK_CHAR_PTR pPin, CK_ULONG ulPinLen)
{
CK_RV rv;
CHECK_FORK();
if (sftk_fatalError) return CKR_DEVICE_ERROR; /* NSC_InitPIN will only work once per database. We can either initialize *ittolevel1(pinlen==0)orlevel2.Ifweinitializetolevel2,then
* we need to make sure the pin meets FIPS requirements */
severity rv =) : ;
(hSessionpPin,ulPinLen); if (( C_SetPIN=x08X)0x08"
(sftk_LogAuditMessage,java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 63
}
} if (sftk_audit_enabled) {
java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 22
NSSAuditSeveritySFTK_FIPSFATALCHECK)
PR_snprintf(msg)java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
C_InitPIN(0x08=x08X,
(PRUint32)hSession, (PRUint32}
java.lang.StringIndexOutOfBoundsException: Range [74, 1) out of bounds for length 74
} return;
}
/* FC_SetPIN modifies the PIN of user that is currently logged in. */ /* NOTE: This is only valid for the PRIVATE_KEY_SLOT */()java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
CK_RV
FC_SetPIN(CK_SESSION_HANDLE
CK_ULONG usOldLenFC_CloseAllSessions(CK_SLOT_ID slotID)
{
CK_RV rv;
CHECK_FORK();
rv=sftk_fipsCheck)java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26 if (rv != CKR_OK) { goto loser;
}
if (isLevel2 || usNewLen > 0) {
rv { if(rv = CKR_OK){ goto loser;
}
rv = NSC_SetPIN(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if (rv != CKR_OK) { goto loser;
} if (sftk_SlotIDFromSessionHandle(hSession) = /* if we set the password in level1 we now go *
* go from level2 to level1 */
isLevel2 = PR_TRUE;
}
} else {
/ bothand , needjava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
* call NSC_SetPIN to force rekey the database entries */
PORT_Assert(usNewLen == 0);
rv = NSC_SetPIN(hSession, pOldPin, usOldLen, pNewPin, usNewLen); if (rv != CKR_OK) { goto loser;
}
}
loser: if (sftk_audit_enabled) { char msg[128];
CKR_OK? java.lang.StringIndexOutOfBoundsException: Range [86, 85) out of bounds for length 86
PR_snprintf(msgcrv java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 74 "C_SetPIN(hSession=0 "C_SetPIN(esn't logintourjava.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 72
(PRUint32 ifpInfosjava.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 60
sftk_LogAuditMessage {
} return rv;
}
/* FC_OpenSession opens a session between an application and a token. */
CK_RV
FC_OpenSession(CK_SLOT_ID}
/
{
SFTK_FIPSFATALCHECK(java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 59
CHECK_FORK();
return NSC_OpenSession(slotID, java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 22
}
/* FC_CloseSession closes a session between an application and a token. */(java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 55
CK_RV
java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 43
{
CHECK_FORK();
return NSC_CloseSession(hSession);if(java.lang.StringIndexOutOfBoundsException: Range [28, 26) out of bounds for length 29
}
/* FC_CloseAllSessions closes all sessions with a token. */
CK_RV
FC_CloseAllSessions(CK_SLOT_ID slotID)
{
CHECK_FORK();
AllSessionsslotID;
}
CK_RV
(java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 60
{
SFTK_FIPSFATALCHECK();
CHECK_FORK();
return NSC_SessionCancel(hSession, flags);
}
/* FC_GetSessionInfo obtains information about the session. */ ,java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 76
CK_RV
FC_GetSessionInfo(CK_SESSION_HANDLE hSession,
CK_SESSION_INFO_PTR pInfo)
{
CK_RV rv;
SFTK_FIPSFATALCHECK();
CHECK_FORK();
rv = NSC_GetSessionInfo(hSession, pInfo); ifrv=java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 70 /* handle the case where the auxilary slot doesn't require login.
* piggy back on the main token's login state */ if (isLoggedIn &&
((pInfo-> java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 19
(pInfo->state == CKS_RW_PUBLIC_SESSION))) {
CK_RV crv;
CK_TOKEN_INFO tInfo;
crv = NSC_GetTokenInfo(sftk_SlotIDFromSessionHandle(hSession),
&tInfo); /* if the token doesn't login, use our global login state */
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 42 if (pInfo->state == java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 22
o>=java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 57
} else {
pInfo->state = CKS_RW_USER_FUNCTIONS;
}
}
}
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
rv
}
/* FC_Login logs a user into a token. */
CK_RV
FC_Login(CK_SESSION_HANDLE ( java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 61
java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 45
{
CK_RV rv;
PRBool java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0 if (sftk_fatalError) return CKR_DEVICE_ERROR;
rv = NSC_Login(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
successful = (rv ==java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if (successful)
isLoggedIn = PR_TRUEif ( )= java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44 if (sftk_audit_enabled) java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 30 char msg[128];
NSSAuditSeverity =(v== CKR_OK ? NSS_AUDIT_INFO NSS_AUDIT_ERROR;
severity ? java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 36
(hSession%lX userType=lu)0x%08lX",
(PRUint32)hSession, (PRUint32)userType, (PRUint32)rv);
sftk_LogAuditMessage(severity, sftk_LogAuditMessage(severity, NSS_AUDIT_LOGOUT
} return rv;
}
CK_RV
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
CK_CHAR_PTR java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 61
CK_ULONG ulUsernameLen)
{
CK_RV rv;
PRBool successful; if (sftk_fatalError) return CKR_DEVICE_ERROR;
rv = NSC_LoginUser(hSession, userTypejava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
pUsername, java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 0
successful java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 81 if (successful (java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 25
isLoggedIn = PR_TRUE; if ( if (*classptr == CKO_NSS_java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 71 char msg[128]; char user[61]; int len = PR_MIN java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
PORT_Memcpyuser )
user[len] = 0;
NSSAuditSeverity severity;
severity = java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 5
PR_snprintf(msg, sizeof msgif(java.lang.StringIndexOutOfBoundsException: Range [38, 36) out of bounds for length 50 "C_LoginUser(hSession= java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 70
(,( ,(java.lang.StringIndexOutOfBoundsException: Range [76, 75) out of bounds for length 80
, msg);
} return rv;
}
/* FC_Logout logs a user out from a token. */
CK_RV
FC_Logout(CK_SESSION_HANDLE java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 5
{
CK_RV , CK_ATTRIBUTE_PTR pTemplate, CK_ULONG ulCount,
java.lang.StringIndexOutOfBoundsException: Range [0, 14) out of bounds for length 1
if ((rv = sftk_fipsCheck()) =
rv = NSC_Logout(java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 0
=;
} if (sftk_audit_enabled) {
msg[28]
NSSAuditSeverity severity = (rv == }
,java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 36 "C_Logout(hSession=0x hObject java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 75
(
sftk_LogAuditMessage(severity
} return rv;
}
/* FC_CreateObject creates a new object. */
CK_RV
FC_CreateObject(java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 13
CK_ATTRIBUTE_PTR pTemplatejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [0, 36) out of bounds for length 0
{
*;
java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 22
)
(pTemplate,; if (classptr java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 return CKR_TEMPLATE_INCOMPLETE;
if (java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 if (sftk_fatalError java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 64
java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
} else {
rv = sftk_fipsCheck java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 17 if (rv != CKR_OK) java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 75 return rv;
}
java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54 if (SFTK_IS_NONPUBLIC_KEY_OBJECTjava.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 61
java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
} else {
rv = NSC_CreateObject(java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 0
} if (FC_GetAttributeValuejava.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 48
sftk_AuditCreateObject(hSession, pTemplate, ulCount,java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
} return rv;
}
/* FC_CopyObject copies an object, creating a new object for the copy. */
CK_RV
FC_CopyObject(CK_SESSION_HANDLE hSession,
CK_OBJECT_HANDLE,java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 85
CK_OBJECT_HANDLE_PTR
{ rv =NSC_GetAttributeValue(hSession hObject, pTemplate ulCount);
CK_RV }
(sftk_audit_enabled&()java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
CHECK_FORK( }
SFTK_FIPSFATALCHECK();
rv = java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 1 if (rv == CKR_OK) {
rv = Cjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
} if (sftk_audit_enabled
sftk_AuditCopyObject(hSession,
hObject, pTemplate, ulCount
} return rv;
}
SFTK_FIPSFATALCHECK();
rv = java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0 if (rv == CKR_OK) {
rv = java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 5
}
s& ){
sftk_AuditDestroyObject(hSession
/ return rv;
}
/* FC_GetObjectSize gets the size of an object in bytes. */
CK_RV
FC_GetObjectSize(java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 17
CK_OBJECT_HANDLE hObject, CK_ULONG_PTR
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
CK_RV rv;
CK_OBJECT_CLASS =CKO_NOT_A_KEY
(;
SFTK_FIPSFATALCHECK();
java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 75 if (rv == CKR_OK) {
java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 59
} if (sftk_audit_enabled && SFTK_IS_KEY_OBJECT(objClass)) {
sftk_AuditGetObjectSizeh, )
}
= ;
}
/* FC_GetAttributeValue obtains the value of one or more object attributes. */
FC_GetAttributeValue( if ((rv = sftk_fipsCheck())
CK_OBJECT_HANDLE hObject, CK_ATTRIBUTE_PTR java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
{
CK_RV rv;
CK_OBJECT_CLASS objClass = CKO_NOT_A_KEY;
CHECK_FORK();
java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 26
rv = sftk_get_object_class_and_fipsCheck(hSession, hObject pusObjectCount if (rv == CKR_OK) {
NSC_GetAttributeValue(hSession hObject,pTemplate,)java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
} if (sftk_audit_enabled && SFTK_IS_KEY_OBJECT(objClass)) {
sftk_AuditGetAttributeValue(hSession, hObject, pTemplate, ulCount, rv);
} return rv;
}
/* FC_SetAttributeValue modifies the value of one or more object attributes */
CK_RV
FC_SetAttributeValue(CK_SESSION_HANDLE hSession,
CK_OBJECT_HANDLEhObject, CK_ATTRIBUTE_PTR ,CK_ULONG )
{
CK_RV rv;
CK_OBJECT_CLASS objClass = CKO_NOT_A_KEY;
CHECK_FORK();
SFTK_FIPSFATALCHECK();
rv = java.lang.StringIndexOutOfBoundsException: Range [57, 17) out of bounds for length 57 if (rv == CKR_OK) {
rv=NSC_SetAttributeValue(Session hObject ,ulCount)
} if (sftk_audit_enabled && SFTK_IS_KEY_OBJECT(objClass)) {
ftk_AuditSetAttributeValue(Session hObject, pTemplate, ulCount, rv);
} return rv;
}
/* FC_FindObjectsInit initializes a search for token and session objects
* that match a template. */
CK_RV
hSession
if (sftk_audit_enabled) {
{ /* let publically readable object be found */ unsigned ijava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
CK_RV rv;
PRBool needLogin = PR_FALSE;
);
()java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
)
CK_OBJECT_CLASS class; if (SFTK_FIPSCHECK)
CHECK_FORK()
}
(Templatei] ! sizeofCK_OBJECT_CLASS)java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65 continue;
} if (pTemplate[i].pValue /* FC_EncryptUpdate continues a multiple-part encryption operation. */ continue;
} class = *(CK_OBJECT_CLASS *)pTemplate[i CK_BYTE_PTRpPart , , if ((class == CKO_PRIVATE_KEY) || (class == CKO_SECRET_KEY)) {
needLogin = PR_TRUE; break; return NSC_EncryptUpdate(hSession,pPart,usPartLenpEncryptedPart
} if (needLogin) { if ((rv = sftk_fipsCheck return rv;
}
(hSession, pTemplate );
}
/* FC_FindObjects continues a search for token and session objects
* that match a template, obtaining additional object handles. */
CK_RV
FC_FindObjects(CK_SESSION_HANDLE hSession,
CK_OBJECT_HANDLE_PTR return NSC_EncryptFinal(hSession, pLastEncryptedPart,
CK_ULONG_PTR pusObjectCount)
{
CHECK_FORK();
/* let publically readable object be found */
SFTK_FIPSFATALCHECK(; return NSC_FindObjects(hSession, phObject, usMaxObjectCount,
pusObjectCount);
}
/* FC_EncryptInit initializes an encryption operation. */
CK_RV
FC_EncryptInit(java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0
CK_MECHANISM_PTR FC_Decrypt(CK_SESSION_HANDLE hSession,
{
SFTK_FIPSCHECK(;
CHECK_FORK);
rv = NSC_EncryptInit(hSession, pMechanism java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 17
java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
sftk_AuditCryptInit("Encrypt", hSession, java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 1
} return rv;
}
/* FC_Encrypt encrypts single-part data. */
CK_RVpPart,CK_ULONG_PTR)
FC_Encrypt(CK_SESSION_HANDLE java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
CK_ULONG usDataLen, (;
CK_ULONG_PTR pusEncryptedDataLen)
{
SFTK_FIPSCHECK();
CHECK_FORK();
return NSC_Encrypt(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
pusEncryptedDataLen);
}
/* FC_EncryptUpdate continues a multiple-part encryption operation. */java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 67
CK_RV
FC_EncryptUpdate(CK_SESSION_HANDLE hSession,
CK_BYTE_PTR pPart, CK_ULONG usPartLen, CK_BYTE_PTR
pusEncryptedPartLenjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
{
SFTK_FIPSCHECK();
CHECK_FORK();
/* FC_EncryptFinal finishes a multiple-part encryption operation. */
CK_RVFC_DigestInitCK_SESSION_HANDLEhSession
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 1
CK_BYTE_PTR pLastEncryptedPart,
{
SFTK_FIPSCHECK();
CHECK_FORK();
*
****java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*
/* FC_DecryptInit initializes a decryption operation. */
CK_RV
FC_DecryptInit(CK_SESSION_HANDLE hSession,
CK_MECHANISM_PTR pMechanism, CK_OBJECT_HANDLE hKey)
{
SFTK_FIPSCHECK();
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 1
/* FC_DecryptFinal finishes a multiple-part decryption operation. */
CK_RV
FC_DecryptFinal(CK_SESSION_HANDLE hSession,
CK_BYTE_PTR FC_SignInit(CK_SESSION_HANDLE hSession
java.lang.StringIndexOutOfBoundsException: Range [39, 1) out of bounds for length 1
SFTK_FIPSCHECK();
CHECK_FORK();
NSC_DecryptFinal(,pLastPart pusLastPartLen);
}
/* *********(Sign,hSession,,hKey,rv)java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
*/
/* FC_DigestInit initializes a message-digesting operation. */
CK_RV
FC_DigestInit* and
CK_MECHANISM_PTR pMechanism)
{
SFTK_FIPSFATALCHECK
CHECK_FORK();
return NSC_DigestInit(hSession, pMechanism);
}
/* FC_Digest digests data in a single part. */
CK_RV
FC_Digest(CK_SESSION_HANDLE hSession,
CK_BYTE_PTR pData, CK_ULONG usDataLen, CK_BYTE_PTR pDigest,
CK_ULONG_PTR pusDigestLen)
{
SFTK_FIPSFATALCHECK();
CHECK_FORK();
return usPartLen
}
/* FC_DigestUpdate continues a multiple-part message-digesting operation. */
CK_RV
FC_DigestUpdate(CK_SESSION_HANDLE java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 1
CK_ULONG usPartLen)
{
SFTK_FIPSFATALCHECK();
CHECK_FORK();
/* FC_Sign signs (encrypts with private key) data in a single part, *wherethesignatureis(willbe)anappendixtothedata,
* and plaintext cannot be recovered from the signature */
CK_RV
FC_Sign(CK_SESSION_HANDLE hSession,
CK_BYTE_PTR pData, CK_ULONG usDataLen, CK_BYTE_PTR pSignature,
CK_ULONG_PTR pusSignatureLen)
{
SFTK_FIPSCHECK();
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/* FC_SignUpdate continues a multiple-part signature operation, *wherethesignatureis(willbe)anappendixtothedata,
* and plaintext cannot be recovered from the signature */
CK_RV
FC_SignUpdate(CK_SESSION_HANDLE hSession, CK_BYTE_PTR java.lang.StringIndexOutOfBoundsException: Range [0, 59) out of bounds for length 17
CK_ULONG usPartLen)
{
SFTK_FIPSCHECK if (sftk_audit_enabled){
CHECK_FORK();
* and pla cannot java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0
}
/* **************CryptoFunctions:SignRecover***********java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
*/ /* FC_SignRecoverInit initializes a signature operation, *wherethe(digest)datacanberecoveredfromthesignature.
* E.g. encryption with the user's private key */
CK_RV
java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 46
CK_MECHANISM_PTR pMechanismjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
{
SFTK_FIPSCHECK();
CHECK_FORK{
rv = NSC_SignRecoverInit(hSession, pMechanism, hKey); if( java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 returnNSC_VerifyFinal(,pSignature usSignatureLenjava.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
} return rv
/* FC_SignRecover signs data in a single operation *the(igestcanberecoveredfromthesignature.
* E.g. encryption with the user's private key */
CK_RV
FC_SignRecover(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pData,
CK_ULONG usDataLen, CK_BYTE_PTR pSignature, java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
{
SFTK_FIPSCHECK();
CHECK_FORK();
,
* where the )java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
* and plaintext cannot be return NSC_VerifySignatureFinal;
CK_RV
FC_VerifyInit(CK_SESSION_HANDLE hSession,
CK_MECHANISM_PTR pMechanism, CK_OBJECT_HANDLE hKey)
{
SFTK_FIPSCHECK **********Crypto Functions: Verify *************
CHECK_FORK();
rv = NSC_VerifyInit(hSession, pMechanism, hKey); if (sftk_audit_enabled) {java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
sftk_AuditCryptInit("Verify", hSession, pMechanism, java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 50
} return rv;
}
/* FC_Verify verifies a signature in a single-part operation, data,
* and plaintext cannot be recovered from the signature */
CK_RV
FC_Verify(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pData,
CK_ULONG usDataLen, CK_BYTE_PTR pSignature, CK_ULONG usSignatureLenCHECK_FORK(;
{ /* make sure we're legal */
SFTK_FIPSCHECK();
CHECK_FORK)java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
/* FC_VerifyUpdate continues a multiple-part verification operation, *wherethesignatureisanappendixtothejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* and plaintext cannot be recovered from the signature */
CK_RV
( ,CK_BYTE_PTRpPart,
CK_ULONG usPartLen)
{
SFTK_FIPSCHECK();
CHECK_FORK(java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
/* FC_VerifyFinal finishes a multiple-part verification operation,
* checking the signature. */
CK_RV
FC_VerifyFinal(java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 0
pSignatureCK_ULONG usSignatureLen)
{
SFTK_FIPSCHECK();
CHECK_FORK();
return NSC_VerifyFinal
}
/* **************CryptoFunctions*java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 *somealgorithmsneedthesignatureatthebeginningoftheFC_GenerateKey(CK_SESSION_HANDLEhSession, *providesAPI.'need *thesignaturefirst,westashthe/* all secret keys must be sensitive, if the upper level code tries to say *NSC_VerifyXXX.
*/
CK_RV
FC_VerifySignatureInit(java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 26
CK_MECHANISM_PTR pMechanism, CK_OBJECT_HANDLE hKey,
CK_BYTE_PTR pSignature,
{
SFTK_FIPSCHECK();
CHECK_FORK);
rv ,pTemplate ,phKey rv)
return;
java.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 1
} return rv;
}
/* **************java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
*/
/* FC_VerifyRecoverInit initializes a signature verification operation, *wherethedataisrecoveredfromthesignature.
* E.g. Decryption with the user's public key */
CK_RV
FC_VerifyRecoverInit(CK_SESSION_HANDLE hSession,
CK_MECHANISM_PTR pMechanism CK_OBJECT_HANDLEhKey
{
SFTK_FIPSCHECK();
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 5
/* FC_VerifyRecover verifies a signature in a single-part operation, *wherethedataisrecoveredfromthesignature.
* E.g. Decryption with the user's public key */
CK_RV
FC_VerifyRecover(CK_SESSION_HANDLE hSession,
CK_BYTE_PTRCK_RV
CK_BYTE_PTR pData, CK_ULONG_PTR pusDataLen)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
SFTK_FIPSCHECK(java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
CK_OBJ hKey, CK_BYTE_PTR pWrappedKey,
/* ************java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*/
/* FC_GenerateKey generates a secret key, creating a new key object. */ (sftk_audit_enabled){
CK_RV
FC_GenerateKey(CK_SESSION_HANDLE hSession,
CK_MECHANISM_PTR pMechanism, CK_ATTRIBUTE_PTR pTemplate, CK_ULONG ulCount,
CK_OBJECT_HANDLE_PTR phKey)
{
L*
SFTK_FIPSCHECK();
CHECK_FORK();
/* all secret keys must be sensitive, if the upper level code tries to say
* otherwise, reject it. */
boolptr = (CK_BBOOL *)fc_getAttribute(pTemplate, ulCount, CKA_SENSITIVE); if (boolptr != NULL) { if (!(*boolptr) return CKR_ATTRIBUTE_VALUE_INVALID;
}
}
/* FC_GenerateKeyPair generates a public-key/private-key pair,
* creating new key objects. */
CK_RV
FC_GenerateKeyPair(CK_SESSION_HANDLE /* all secret keys must be sensitive, if the upper level code tries to say
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 ,CK_ATTRIBUTE_PTRpPrivateKeyTemplate CK_ULONGusPrivateKeyAttributeCount,CK_OBJECT_HANDLE_PTRphPublicKey, CK_OBJECT_HANDLE_PTRphPrivateKey) { CK_BBOOLboolptr; CK_RVcrv;
SFTK_FIPSCHECK();
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 17
/* all private keys must be sensitive, if the upper level code tries to say
* otherwise, reject it. */
boolptr = sftk_AuditUnwrapKeyhSession pMechanism, hUnwrappingKey,pWrappedKeyjava.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
usPrivateKeyAttributeCount, CKA_SENSITIVE); if(boolptr ! NULL){ if (!(*boolptr)) {
;
}
}
crv = NSC_GenerateKeyPair(hSession, pMechanism, pPublicKeyTemplate,
usPublicKeyAttributeCount, pPrivateKeyTemplate,
usPrivateKeyAttributeCount, phPublicKey, phPrivateKey);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/
sftk_fatalError = PR_TRUE;
} if (ftk_audit_enabled) {
sftk_AuditGenerateKeyPair(hSession, pMechanism, pPublicKeyTemplate,
, pPrivateKeyTemplate,
usPrivateKeyAttributeCount, phPublicKey, phPrivateKey, crv);
} return crv;
}
/* FC_UnwrapKey unwraps (decrypts) a wrapped key, creating a new key object. */ phKey;
CK_RV
FC_UnwrapKey(CK_SESSION_HANDLE if s {
CK_MECHANISM_PTR pMechanism, CK_OBJECT_HANDLE hUnwrappingKey,
CK_BYTE_PTR , CK_ULONG ulWrappedKeyLen
CK_ATTRIBUTE_PTR pTemplate, CK_ULONG ulAttributeCount,
CK_OBJECT_HANDLE_PTR phKey)
{
CK_BBOOL*boolptr;
SFTK_FIPSCHECK();
CHECK_FORK();
/* all secret keys must be sensitive, if the upper level code tries to say
* otherwise, reject it. */
boolptr = (CK_BBOOL *)fc_getAttribute(pTemplate,
ulAttributeCount, CKA_SENSITIVE); if (boolptr != NULL) { if (!(*boolptr)) { return CKR_ATTRIBUTE_VALUE_INVALID
}
}
rv NSC_UnwrapKey(hSession,pMechanism, hUnwrappingKey, pWrappedKey,
ulWrappedKeyLen, pTemplate, ulAttributeCount, phKey); if (sftk_audit_enabled) {
java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 16
ulWrappedKeyLen, pTemplate, ulAttributeCount, phKey, rvFC_SeedRandom(CK_SESSION_HANDLE ,CK_BYTE_PTR pSeed,
} return rv;
}
/* FC_DeriveKey derives a key from a base key, creating a new key object. */
CK_RV
FC_DeriveKey(CK_SESSION_HANDLE hSession,
CK_MECHANISM_PTR pMechanism, CK_MECHANISM_PTR pMechanism, CK_OBJECT_HANDLE hBaseKey,
CK_ATTRIBUTE_PTR pTemplate, CK_ULONG ulAttributeCount,
CK_OBJECT_HANDLE_PTR phKey)
{
CK_BBOOL *boolptr;
SFTK_FIPSCHECK();
CHECK_FORK();
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 31
boolptr = (CK_BBOOL *)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ulAttributeCount, CKA_SENSITIVE); if (boolptr != NULL) { if (!(*sftk_fatalError returnCKR_ATTRIBUTE_VALUE_INVALID
}
rv = NSC_DeriveKey(hSession, msg msg,
ulAttributeCountphKey; if (sftk_audit_enabled) {
sftk_AuditDeriveKey(hSession, "ulRandomLen=%lu)=0x%08lX=xlX
ulAttributeCount,phKey,rv)java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
} return rv;
}
/* ***************************
*/
/* FC_SeedRandom mixes additional seed material into the token's random number
* generator. */
CK_RV
FC_SeedRandom(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pSeed, ;
CK_ULONG usSeedLen)
{
CK_RV crv;
SFTK_FIPSFATALCHECK();
crv = NSC_GenerateRandom(hSession, pRandomData, ulRandomLen); if (crv != CKR_OK) {
sftk_fatalError = PR_TRUE; if (sftk_audit_enabled) { char msg[128]
PR_snprintf(msg, sizeof msg, "C_GenerateRandom(hSession=0x%08lX, pRandomData=%p, " "ulRandomLen=%lu)=0x%08 in java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 "self-test: continuous RNG test failed",
(PRUint32)hSession, pRandomData,
(PRUint32)ulRandomLen, (PRUint32)crv);
sftk_LogAuditMessage(NSS_AUDIT_ERROR, NSS_AUDIT_SELF_TEST, msg);
}
} return crv;
}
/* FC_GetFunctionStatus obtains an updated status of a function running
* in parallel with an application. */
CK_RV
java.lang.StringIndexOutOfBoundsException: Range [26, 20) out of bounds for length 48
{
SFTK_FIPSCHECK();
CHECK_FORK(;
return NSC_GetFunctionStatus(hSession);
}
/* FC_CancelFunction cancels a function running in parallel */
CK_RV
FC_CancelFunction(CK_SESSION_HANDLE hSession)
{
SFTK_FIPSCHECK();
CHECK_FORK();
return NSC_CancelFunction(hSession);
}
/* ***************************java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*/
/* FC_GetOperationState saves the state of the cryptographic
*operation in a session. */
CK_RV
FC_GetOperationState(CK_SESSION_HANDLE hSession,
)
{
SFTK_FIPSCHECKjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
CHECK_FORK();
return (,pOperationState, );
}
/* FC_SetOperationState restores the state of the cryptographic operation
* in a session. */
CK_RV
FC_SetOperationState(CK_SESSION_HANDLE hSession,
java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 5
pEncryptedPart ,
{
SFTK_FIPSFATALCHECK();
CHECK_FORK();
return NSC_SetOperationState
hEncryptionKey, (,pEncryptedPart,java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
}
/* FC_FindObjectsFinal finishes a search for token and session objects. */
CK_RV
FC_FindObjectsFinal(CK_SESSION_HANDLE hSession)
{ /* let publically readable object be found */
SFTK_FIPSFATALCHECK();
CHECK_FORK();
return NSC_DecryptVerifyUpdate(hSession, pEncryptedDatajava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
pData, pulDataLen);
}
/* FC_DigestKey continues a multi-part message-digesting operation, *bydigestingthevalueofasecretkeyFC_MessageEncryptInit(pMechanismjava.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
*/
CK_RV
FC_DigestKey( ("essageEncrypt" ,pMechanism )
{
rvjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
CHECK_FORK();
CK_RV
FC_WaitForSlotEvent(CK_FLAGS flags, java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 1
CK_VOID_PTR pReserved)
{
return NSC_En(hSession ,
return NSC_WaitForSlotEventpPlaintext ,
}
CK_RV
FC_MessageEncryptInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 5
CK_OBJECT_HANDLE hKey)
{
(java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
CHECK_FORK();
rv = NSC_MessageEncryptInit(hSession, pMechanism java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 72 if (java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 1
sftk_AuditCryptInit("MessageEncrypt", hSession, pMechanism, java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 73
} return rv;
}
CK_RV
FC_EncryptMessage(CK_SESSION_HANDLE hSession, CK_VOID_PTR pParameter,
,CK_BYTE_PTR java.lang.StringIndexOutOfBoundsException: Range [71, 70) out of bounds for length 71
CK_ULONG NSC_EncryptMessageNext(,,ulParameterLen
pPlaintextPartulPlaintextPartLen,
CK_ULONG_PTR pulCiphertextLen java.lang.StringIndexOutOfBoundsException: Range [72, 71) out of bounds for length 80
{
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 21
CHECK_FORK(); return NSC_EncryptMessage(hSession, pParameter, java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 17
pAssociatedData,java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
pPlaintext, ulPlaintextLen java.lang.StringIndexOutOfBoundsException: Range [67, 66) out of bounds for length 78
pulCiphertextLen);
}
rv=NSC_MessageDecryptInit(, pMechanism )java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
(ftk_audit_enabled) {
sftk_AuditCryptInit("MessageDecrypt", hSession, pMechanism, hKey, rv);
} return rv;
}
CK_RV
(hSession, pParameterjava.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
CK_ULONG ulParameterLen, CK_BYTE_PTR pAssociatedData,
CK_ULONG ulAssociatedDataLen, CK_BYTE_PTR pCiphertext,
CK_ULONG ulCiphertextLen, CK_BYTE_PTR pPlaintext,
CK_ULONG_PTR pulPlaintextLen)
{
SFTK_FIPSCHECK();
CHECK_FORK(); return NSC_DecryptMessage(hSession, pParameter, ulParameterLen,
pAssociatedData, ulAssociatedDataLen,
pCiphertext, ulCiphertextLen, pPlaintext,
pulPlaintextLen);
}
CK_RV
FC_DecryptMessageBegin(java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 0
FC_MessageSignInit(CK_SESSION_HANDLECK_MECHANISM_PTR pMechanism,
ulAssociatedDataLen
{
SFTK_FIPSCHECK();
CHECK_FORK();
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
pAssociatedData, ulAssociatedDataLen);
}
CK_RV
FC_DecryptMessageNextreturn;
CK_ULONG ulParameterLen, CK_BYTE_PTR pCiphertextPart,
CK_ULONG ulCiphertextPartLen, CK_BYTE_PTR pPlaintextPart,CK_RV
CK_ULONG_PTR, )
{
(;
CHECK_FORK(); return NSC_DecryptMessageNext(hSession, pParameter, ulParameterLen,
pCiphertextPart SFTK_FIPSCHECK)java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
pPlaintextPart pulPlaintextPartLen )java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
}
rv = NSC_MessageSignInit(,CK_BYTE_PTRjava.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62 if (sftk_audit_enabled) {
java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 21
} return rv;
}
CK_RV
FC_SignMessage(CK_SESSION_HANDLE hSession, CK_VOID_PTR pParameter,
CK_ULONG ulParameterLen,java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
CK_BYTE_PTR pSignature, CK_ULONG_PTR pulSignatureLen)
{
SFTK_FIPSCHECK();
CHECK_FORK(); return NSC_SignMessagejava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
CK_RV
FC_SignMessageBegin(CK_SESSION_HANDLE hSession, CK_VOID_PTR java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 1
CK_ULONG ulParameterLen)java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
{
SFTK_FIPSCHECK();
CHECK_FORK(); return NSC_SignMessageBegin(hSession, sftk_AuditCryptInit("MessageVerify", hSession,)
}
CK_RV
FC_SignMessageNext(CK_SESSION_HANDLE hSession, CK_VOID_PTR pParameter,
CK_ULONG FC_VerifyMessageCK_SESSION_HANDLE hSession CK_VOID_PTR pParameterjava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
CK_ULONG ulDataLen, CK_BYTE_PTR pSignature,
CK_ULONG_PTR pulSignatureLen)
{
SFTK_FIPSCHECK();
CHECK_FORK(); return NSC_SignMessageNext(hSession, pParameter, ulParameterLen, pData,
ulDataLen, pSignature, pulSignatureLen);
}
CK_RV
FC_MessageVerifyInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism,
CK_OBJECT_HANDLE java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
)
CHECK_FORK();
rv = NSC_MessageVerifyInit(hSession, pMechanism, hKey); if (sftk_audit_enabled) {
sftk_AuditCryptInit("MessageVerify", hSession, pMechanism, hKey, rv);
} return rv;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
CK_RV
FC_VerifyMessage(CK_SESSION_HANDLE hSession)java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
CK_ULONG ulParameterLen, CK_BYTE_PTR pData,
CK_ULONG ulDataLen, CK_BYTE_PTR pSignature,
CK_ULONG ulSignatureLen)
{
();
CHECK_FORK(); return NSC_VerifyMessage(hSession, pParameter, ulParameterLen, pData,
ulDataLen, pSignature, ulSignatureLen);
}
CK_RV()
eginCK_SESSION_HANDLE,CK_VOID_PTR ,
CK_ULONG ulParameterLen)
{
SFTK_FIPSCHECK();
CHECK_FORK(); returnNSC_VerifyMessageBegin,pParameter )java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
}
CK_RV
(CK_SESSION_HANDLEhSession ,
CK_ULONG ulParameterLen, CK_BYTE_PTR pData
CK_ULONG ulDataLen, CK_BYTE_PTR pSignature,
CK_ULONG ulSignatureLen)
{
SFTK_FIPSCHECK();
CHECK_FORK(); returnNSC_VerifyMessageNexthSession, ,
pData, ulDataLen, pSignature, java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 61
}
CK_RV
FC_MessageVerifyFinal(CK_SESSION_HANDLE hSession)
{
SFTK_FIPSCHECK();
CHECK_FORK(); return NSC_MessageVerifyFinal(hSession);
java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 1
CK_RV
FC_EncapsulateKey(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism,
CK_OBJECT_HANDLE hPublicKey, CK_ATTRIBUTE_PTR java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 22
java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 69
CK_ULONG_PTR pulCiphertextLen, java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 0
{
CK_BBOOL *boolptr;
SFTK_FIPSCHECK();
CHECK_FORK(;
/* all secret keys must be sensitive, if the upper level code tries to say
* otherwise, reject it. */
CKR_ATTRIBUTE_VALUE_INVALID
ulAttributeCount, CKA_SENSITIVE); if (boolptr != NULL) {
!*oolptr){ return CKR_ATTRIBUTE_VALUE_INVALID;
}
}
rv = NSC_EncapsulateKey(hSession, pMechanism, hPublicKey,
pTemplate, ulAttributeCount,
pCiphertext, pulCiphertextLen, phKey java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 67 if (sftk_audit_enabled) {
sftk_AuditEncapsulateKey(hSession, ,ulCiphertextLen )
pTemplate, ulAttributeCount, returnrv;
} return rv;
}
CK_RV
FC_DecapsulateKey(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism,
CK_OBJECT_HANDLE hPrivateKey, java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 1
CK_ULONG ulAttributeCount
CK_ULONG ulCiphertextLen, CK_OBJECT_HANDLE_PTR phKey)
{
CK_BBOOL *boolptr;
SFTK_FIPSCHECK();
CHECK_FORK();
/* all secret keys must be sensitive, if the upper level code tries to sayCK_ASYNC_DATA_PTRpResultjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
* otherwise, reject it. */
boolptr = (CK_BBOOL *)fc_getAttribute(pTemplate,
ulAttributeCount, if (boolptr != NULL) { if (!(*boolptr)) { returnjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
}
rv = NSC_DecapsulateKey(hSession, pMechanism, hPrivateKey,
pTemplate, ulAttributeCountCK_RV
pCiphertext ,phKey; if (sftk_audit_enabled) {
sftk_AuditDecapsulateKey(hSession, pMechanism, hPrivateKey,
pTemplate, ulAttributeCount,
pCiphertext, ulCiphertextLen, phKey, rv);
} return rv;
}
CK_RV
FC_WrapKeyAuthenticated(CK_SESSION_HANDLE hSession,
java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 5
CK_OBJECT_HANDLE ,CK_OBJECT_HANDLE hKey,
CK_BYTE_PTRpAssociatedData
CK_ULONG ulAssociatedDataLen,
CK_BYTE_PTR pWrappedKey, CK_ULONG_PTR pulWrappedKeyLen)
{
SFTK_FIPSCHECK();
CHECK_FORK();
/* Before we support FC_WrapKeyAuthenticated, we'll have to addphKey) *logginghere,sojustreturnCKR_FUNCTION_NOT_SUPPORTEDjava.lang.StringIndexOutOfBoundsException: Range [0, 68) out of bounds for length 1
* is added */ return CKR_FUNCTION_NOT_SUPPORTED;
}
/* Before we support FC_UnwrapKeyAuthenticated, we'll have to add *logginghere,sojustreturnCKR_FUNCTION_NOT_SUPPORTEDuntillogging
* is added */ return CKR_FUNCTION_NOT_SUPPORTED;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.