Subversion Repositories planix.SVN

Rev

Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 33
Line 414... Line 414...
414
	sha1(connp->cert, connp->certlen, digest, nil);
414
	sha1(connp->cert, connp->certlen, digest, nil);
415
	/*
415
	/*
416
	 * don't do this any more.  our local it people are rotating their
416
	 * don't do this any more.  our local it people are rotating their
417
	 * certificates faster than we can keep up.
417
	 * certificates faster than we can keep up.
418
	 */
418
	 */
419
	if(0 && (!imap->thumb || !okThumbprint(digest, imap->thumb))){
419
	if(0 && (!imap->thumb || !okThumbprint(digest, SHA1dlen, imap->thumb))){
420
		close(sfd);
420
		close(sfd);
421
		werrstr("server certificate %.*H not recognized",
421
		werrstr("server certificate %.*H not recognized",
422
			SHA1dlen, digest);
422
			SHA1dlen, digest);
423
		return -1;
423
		return -1;
424
	}
424
	}
Line 738... Line 738...
738
	}
738
	}
739
 
739
 
740
	if(argc==1 && strcmp(argv[0], "thumbprint")==0){
740
	if(argc==1 && strcmp(argv[0], "thumbprint")==0){
741
		if(imap->thumb)
741
		if(imap->thumb)
742
			freeThumbprints(imap->thumb);
742
			freeThumbprints(imap->thumb);
743
		imap->thumb = initThumbprints("/sys/lib/tls/mail", "/sys/lib/tls/mail.exclude");
743
		imap->thumb = initThumbprints("/sys/lib/tls/mail", "/sys/lib/tls/mail.exclude","x509");
744
	}
744
	}
745
	if(strcmp(argv[0], "refresh")==0){
745
	if(strcmp(argv[0], "refresh")==0){
746
		if(argc==1){
746
		if(argc==1){
747
			imap->refreshtime = 60;
747
			imap->refreshtime = 60;
748
			return nil;
748
			return nil;
Line 814... Line 814...
814
		imap->user = f[3];
814
		imap->user = f[3];
815
	if(nf < 5)
815
	if(nf < 5)
816
		imap->mbox = "Inbox";
816
		imap->mbox = "Inbox";
817
	else
817
	else
818
		imap->mbox = f[4];
818
		imap->mbox = f[4];
819
	imap->thumb = initThumbprints("/sys/lib/tls/mail", "/sys/lib/tls/mail.exclude");
819
	imap->thumb = initThumbprints("/sys/lib/tls/mail", "/sys/lib/tls/mail.exclude","x509");
820
 
820
 
821
	mb->aux = imap;
821
	mb->aux = imap;
822
	mb->sync = imap4sync;
822
	mb->sync = imap4sync;
823
	mb->close = imap4close;
823
	mb->close = imap4close;
824
	mb->ctl = imap4ctl;
824
	mb->ctl = imap4ctl;