Search completed in 0.99 seconds.
17 results for "PR_DELETE":
Your results are loading. Please wait...
PR_Delete
syntax #include <prio.h> prstatus pr_delete(const char *name); parameters the function has the following parameter: name the pathname of the file to be deleted.
... description pr_delete deletes a file with the specified pathname name.
PR_DELETE
syntax #include <prmem.h> void pr_delete(_ptr); parameter _ptr the address of memory to be returned to the heap.
PR_DeleteSemaphore
syntax #include <pripcsem.h> nspr_api(prstatus) pr_deletesemaphore(const char *name); parameter the function has the following parameter: name the name of a semaphore that was previously created via a call to pr_opensemaphore.
PR_DeleteSharedMemory
syntax #include <prshm.h> nspr_api( prstatus ) pr_deletesharedmemory( const char *name ); parameter the function has these parameter: shm the handle returned from pr_opensharedmemory.
Named Shared Memory
pr_deletesharedmemory should be called before process termination.
... after you call pr_deletesharedmemory, any further use of the shared memory associated with the name may cause unpredictable results.
... named shared memory functions pr_opensharedmemory pr_attachsharedmemory pr_detachsharedmemory pr_closesharedmemory pr_deletesharedmemory ...
Enc Dec MAC Using Key Wrap CertReq PKCS10 CSR
*exthandle = null; prfiledesc *outfile = null; certsubjectpublickeyinfo *spki = null; certcertificaterequest *cr = null; secitem *encoding = null; /* if the certificate request file already exists, delete it */ if (pr_access(certreqfilename, pr_access_exists) == pr_success) { pr_delete(certreqfilename); } /* open the certificate request file to write */ outfile = pr_open(certreqfilename, pr_create_file | pr_rdwr | pr_truncate, 00660); if (!outfile) { pr_fprintf(pr_stderr, "unable to open \"%s\" for writing (%ld, %ld).\n", certreqfilename, pr_geterror(), pr_getoserror()); goto cleanup; } /* ...
... sigverify) { secstatus rv = secsuccess; prfiledesc *headerfile = null; certcertificate *cert = null; headertype htype = certenc; /* if the intermediate header file already exists, delete it */ if (pr_access(headerfilename, pr_access_exists) == pr_success) { pr_delete(headerfilename); } headerfile = pr_open(headerfilename, pr_create_file | pr_rdwr | pr_truncate, 00660); if (!headerfile) { pr_fprintf(pr_stderr, "unable to open \"%s\" for writing (%ld, %ld).\n", headerfilename, pr_geterror(), pr_getoserror()); rv = secfailure; goto cleanup; } cert = cert_findcertbynicknameoremailaddr(certhandl...
... ptextlen; int index; unsigned int nwritten; unsigned int pad[1]; secitem paditem; unsigned int paddinglength = 0; seckeypublickey *pubkey = null; /* if the intermediate encrypted file already exists, delete it*/ if (pr_access(encryptedfilename, pr_access_exists) == pr_success) { pr_delete(encryptedfilename); } /* read certificate from header file */ rv = readfromheaderfile(headerfilename, certenc, &data, pr_true); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not read certificate from header file\n"); goto cleanup; } /* read in an ascii cert and return a certcertificate */ cert = cert_decodecertfrompackage((char *)data.da...
sample2
name) { secoidtag signalgtag; secitem result; print32 numbytes; secstatus rv = secsuccess; prarenapool *arena = null; void *exthandle = null; prfiledesc *outfile = null; certsubjectpublickeyinfo *spki = null; certcertificaterequest *cr = null; secitem *encoding = null; /* if the certificate request file already exists, delete it */ if (pr_access(certreqfilename, pr_access_exists) == pr_success) { pr_delete(certreqfilename); } /* open the certificate request file to write */ outfile = pr_open(certreqfilename, pr_create_file | pr_rdwr | pr_truncate, 00660); if (!outfile) { pr_fprintf(pr_stderr, "unable to open \"%s\" for writing (%ld, %ld).\n", certreqfilename, pr_geterror(), pr_getoserror()); goto cleanup; } /* create info about public key */ spki = seckey_createsubjectpublickeyinfo(pubk); if (!spki...
...atetoheader(pk11slotinfo *slot, secupwdata *pwdata, const char *headerfilename, certcertdbhandle *certhandle, const char *nicknamestr, prbool sigverify) { secstatus rv = secsuccess; prfiledesc *headerfile = null; certcertificate *cert = null; headertype htype = certenc; /* if the intermediate header file already exists, delete it */ if (pr_access(headerfilename, pr_access_exists) == pr_success) { pr_delete(headerfilename); } headerfile = pr_open(headerfilename, pr_create_file | pr_rdwr | pr_truncate, 00660); if (!headerfile) { pr_fprintf(pr_stderr, "unable to open \"%s\" for writing (%ld, %ld).\n", headerfilename, pr_geterror(), pr_getoserror()); rv = secfailure; goto cleanup; } cert = cert_findcertbynicknameoremailaddr(certhandle, nicknamestr); if (!cert) { pr_fprintf(pr_stderr, "could not obtain ...
...ificate *cert = null; secitem data; unsigned char ptext[modblocksize]; unsigned char encbuf[modblocksize]; unsigned int ptextlen; int index; unsigned int nwritten; unsigned int pad[1]; secitem paditem; unsigned int paddinglength = 0; seckeypublickey *pubkey = null; /* if the intermediate encrypted file already exists, delete it*/ if (pr_access(encryptedfilename, pr_access_exists) == pr_success) { pr_delete(encryptedfilename); } /* read certificate from header file */ rv = readfromheaderfile(headerfilename, certenc, &data, pr_true); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not read certificate from header file\n"); goto cleanup; } /* read in an ascii cert and return a certcertificate */ cert = cert_decodecertfrompackage((char *)data.data, data.len); if (!cert) { pr_fprintf(pr_stderr, "co...
Encrypt Decrypt_MAC_Using Token
*/ if (pr_access(headerfilename, pr_access_exists) == pr_success) { pr_delete(headerfilename); } /* if the intermediate encrypted already exists, delete it.
... */ if (pr_access(encryptedfilename, pr_access_exists) == pr_success) { pr_delete(encryptedfilename); } /* open db for read/write and authenticate to it.
Choosing the right memory allocator
pr_alloc() (do not use, no users and only exists in /security/; use pr_malloc() instead) pr_malloc() == pr_malloc pr_calloc() == pr_calloc pr_realloc() == pr_realloc pr_free() pr_new (pass in a struct to allocate its size) pr_newzap (same as pr_new, but zeros memory) pr_delete (pr_free() and also clears the pointer) pr_freeif special cases pr_smprintf(), pr_sprintf_append(), pr_vsmprintf() and pr_vsprintf_append() must be freed with pr_smprintf_free() pl_strdup(), pl_strndup() must be freed with pl_strfree() nscrt::strdup/nscrt::strndup must be freed with nscrt::free allocating memory within plugins there are special memory allocation routines specifica...
IPC Semaphores
note: see also named shared memory ipc semaphore functions ipc semaphore functions pr_opensemaphore pr_waitsemaphore pr_postsemaphore pr_closesemaphore pr_deletesemaphore ...
I/O Functions
pr_open pr_delete pr_getfileinfo pr_getfileinfo64 pr_rename pr_access type praccesshow functions that act on file descriptors pr_close pr_read pr_write pr_writev pr_getopenfileinfo pr_getopenfileinfo64 pr_seek pr_seek64 pr_available pr_available64 pr_sync pr_getdesctype pr_getspecialfd pr_createpipe directory i/o functions pr_opendir pr_readdir pr_closedir pr_mkdir pr_rm...
Memory Management Operations
memory allocation macros macro versions of the memory allocation functions are available, as well as additional macros that provide programming convenience: pr_malloc pr_new pr_realloc pr_calloc pr_newzap pr_delete pr_freeif ...
PR_OpenSemaphore
the created semaphore needs to be removed from the system with a pr_deletesemaphore call.
Encrypt Decrypt MAC Keys As Session Objects
le, choose filename as inputfile name with extension ".enc" */ strcpy(encryptedfilename, infilename); strcat(encryptedfilename, ".enc"); pr_init(pr_user_thread, pr_priority_normal, 0); switch (cmd) { case encrypt: /* if the intermediate header file already exists, delete it */ if (pr_access(headerfilename, pr_access_exists) == pr_success) { pr_delete(headerfilename); } /* if the intermediate encrypted already exists, delete it */ if (pr_access(encryptedfilename, pr_access_exists) == pr_success) { pr_delete(encryptedfilename); } /* open db for read/write and authenticate to it.
Encrypt and decrypt MAC using token
le, choose filename as inputfile name with extension ".enc" */ strcpy(encryptedfilename, infilename); strcat(encryptedfilename, ".enc"); pr_init(pr_user_thread, pr_priority_normal, 0); switch (cmd) { case encrypt: /* if the intermediate header file already exists, delete it */ if (pr_access(headerfilename, pr_access_exists) == pr_success) { pr_delete(headerfilename); } /* if the intermediate encrypted already exists, delete it */ if (pr_access(encryptedfilename, pr_access_exists) == pr_success) { pr_delete(encryptedfilename); } /* open db for read/write and authenticate to it.
NSS Sample Code Sample_3_Basic Encryption and MACing
le, choose filename as inputfile name with extension ".enc" */ strcpy(encryptedfilename, infilename); strcat(encryptedfilename, ".enc"); pr_init(pr_user_thread, pr_priority_normal, 0); switch (cmd) { case encrypt: /* if the intermediate header file already exists, delete it */ if (pr_access(headerfilename, pr_access_exists) == pr_success) { pr_delete(headerfilename); } /* if the intermediate encrypted already exists, delete it */ if (pr_access(encryptedfilename, pr_access_exists) == pr_success) { pr_delete(encryptedfilename); } /* open db for read/write and authenticate to it.
EncDecMAC using token object - sample 3
derfilename, ".header"); /* for intermediate encrypted file, choose filename as inputfile name with extension ".enc" */ strcpy(encryptedfilename, infilename); strcat(encryptedfilename, ".enc"); pr_init(pr_user_thread, pr_priority_normal, 0); switch (cmd) { case encrypt: /* if the intermediate header file already exists, delete it */ if (pr_access(headerfilename, pr_access_exists) == pr_success) { pr_delete(headerfilename); } /* if the intermediate encrypted already exists, delete it */ if (pr_access(encryptedfilename, pr_access_exists) == pr_success) { pr_delete(encryptedfilename); } /* open db for read/write and authenticate to it.