nsNSSCertTrust::nsNSSCertTrust(unsigned int ssl, unsigned int email, unsigned int objsign) { memset(&mTrust, 0, sizeof(CERTCertTrust)); addTrust(&mTrust.sslFlags, ssl); addTrust(&mTrust.emailFlags, email); addTrust(&mTrust.objectSigningFlags, objsign); }
void nsNSSCertTrust::AddPeerTrust(bool ssl, bool email, bool objSign) { if (ssl) addTrust(&mTrust.sslFlags, CERTDB_TRUSTED); if (email) addTrust(&mTrust.emailFlags, CERTDB_TRUSTED); if (objSign) addTrust(&mTrust.objectSigningFlags, CERTDB_TRUSTED); }
Graph* buildTrustGraph(int forum, Graph* g) { Graph * trustGraph = createGraph(M,C); char buffer[200]; Node * n; FILE * fp = fopen("forum_hasMember_person.csv","r"); if (fp == NULL) { perror ("Error opening file"); exit(-1); } fgets(buffer,200,fp); while(fgets(buffer,200,fp)!= NULL) //insert users of the forum { if (forum == atoi(strtok (buffer,"|"))) { n = createPerson(atoi(strtok (NULL,"|")),NULL); insertNode(n,trustGraph); } } fclose(fp); Graph * PostGraph = createPostForum("forum_containerOf_post.csv","post_hasCreator_person.csv",forum); //creating posts hash_map Graph * CommentGraph = CreateComments("comment_replyOf_post.csv","comment_hasCreator_person.csv",PostGraph); insertLikes("person_likes_post.csv", PostGraph, trustGraph,g); insertComments("comment_replyOf_post.csv", CommentGraph, PostGraph, trustGraph, g); addTrust(trustGraph,g); freePCGraph(PostGraph); freePCGraph(CommentGraph); return trustGraph; }
void nsNSSCertTrust::AddCATrust(bool ssl, bool email, bool objSign) { if (ssl) { addTrust(&mTrust.sslFlags, CERTDB_TRUSTED_CA); addTrust(&mTrust.sslFlags, CERTDB_TRUSTED_CLIENT_CA); } if (email) { addTrust(&mTrust.emailFlags, CERTDB_TRUSTED_CA); addTrust(&mTrust.emailFlags, CERTDB_TRUSTED_CLIENT_CA); } if (objSign) { addTrust(&mTrust.objectSigningFlags, CERTDB_TRUSTED_CA); addTrust(&mTrust.objectSigningFlags, CERTDB_TRUSTED_CLIENT_CA); } }
void nsNSSCertTrust::SetEmailTrust(bool peer, bool tPeer, bool ca, bool tCA, bool tClientCA, bool user, bool warn) { mTrust.emailFlags = 0; if (peer || tPeer) addTrust(&mTrust.emailFlags, CERTDB_TERMINAL_RECORD); if (tPeer) addTrust(&mTrust.emailFlags, CERTDB_TRUSTED); if (ca || tCA) addTrust(&mTrust.emailFlags, CERTDB_VALID_CA); if (tClientCA) addTrust(&mTrust.emailFlags, CERTDB_TRUSTED_CLIENT_CA); if (tCA) addTrust(&mTrust.emailFlags, CERTDB_TRUSTED_CA); if (user) addTrust(&mTrust.emailFlags, CERTDB_USER); if (warn) addTrust(&mTrust.emailFlags, CERTDB_SEND_WARN); }
void nsNSSCertTrust::SetSSLTrust(PRBool peer, PRBool tPeer, PRBool ca, PRBool tCA, PRBool tClientCA, PRBool user, PRBool warn) { mTrust.sslFlags = 0; if (peer || tPeer) addTrust(&mTrust.sslFlags, CERTDB_VALID_PEER); if (tPeer) addTrust(&mTrust.sslFlags, CERTDB_TRUSTED); if (ca || tCA) addTrust(&mTrust.sslFlags, CERTDB_VALID_CA); if (tClientCA) addTrust(&mTrust.sslFlags, CERTDB_TRUSTED_CLIENT_CA); if (tCA) addTrust(&mTrust.sslFlags, CERTDB_TRUSTED_CA); if (user) addTrust(&mTrust.sslFlags, CERTDB_USER); if (warn) addTrust(&mTrust.sslFlags, CERTDB_SEND_WARN); }