text:
My Favorite Fallacies
Presented October 25, 2015, by Dr. Steve Wiegensein
I want to start this morning by thinking a little more about our opening hymn [Die Gedanken Sind Frei - hymn No. 291]. It's one of those tunes that gets inside your head and stays there for days at a time, and it's been doing that for me all week. Some of you may recognize it. We had a record of it when I was a kid. My mother was a great fan of Pete Seeger, and it was on one of his albums. It had even been a minor hit for the Limelighters during the first wave of folk music popularity in the 1950s.
But the song has a much longer history. It was sung during the Peasants' Rebellion in Germany in the 1500s. The Peasants' Rebellion was one of the rare occasions when both Martin Luther and the Catholic Church were in agreement - namely, that the peasants needed to be put back in their place. After the failed German rebellion of 1848, the song was banned. And it was a popular song among some anti-Nazi resistance movements during the Second World War. So it's a song with a long and honored history.
And the sentiments of the song have a powerful message as well. Our thoughts are free, whatever our life situation may be. We can all think of situations that illustrate this message: Nelson Mandela, leading his movement from an island prison. Stephen Hawking, his thoughts ranging though time and space despite the prison of his body. And closer to home, free-ranging thoughts have gotten many a bored school child through a long day.
But while unchained thoughts are a noble and delightful image, thinking freely isn't as universal or simple as it may sound. Here's another childhood recollection: I remember reading biographies of famous literary or historical figures, and often there would be the remark that this or that person had gotten in trouble, been rejected by a potential spouse, or suffered some other ill consequence because of being a "freethinker." That always puzzled me when I was young. What could be the problem with thinking freely?
Nowadays, I realize what "freethinker" meant in earlier times. It was someone who rejected religious authority in favor of rational thought, and more specifically, someone who denied the divinity of Jesus. So there's the problem. Free thought is dangerous to the established order. Being a "freethinker" in past centuries was the equivalent of being a thought criminal. You were a risky person to hang around with, a troublemaker and a threat.
It would be nice if such ideas were a thing of the past, but they're not. I drove past a church billboard the other day that had the message, "Question Doubt - Feed Your Faith." This isn't an uncommon idea, that entertaining doubts is a dangerous thing, and that good Christians should not allow doubts about dogma to interfere with their beliefs. Rather, they should work to keep doubts out of their minds, and to regard them with suspicion whenever they occur. Faith is the superior virtue.
This is not an attitude that meets with much enthusiasm in the Unitarian Church. We take more of a "cherish doubt" approach. Doubt, for UUs, is part of the process of growth. Doubt is a step on the way to study and deeper understanding. If our church ever tried to suppress doubt or "free thinking," it would lose the very thing that attracts us in the first place, its sense of openness to experience and celebration of difference, and its appreciation of the fun of thinking.
But before we start feeling all superior, we should reflect on the process of thinking itself, and on just how "free" our thoughts are. When I was teaching a course on mass media every year, I would do an exercise at the beginning of the semester that I called, "How do you know that?" The exercise goes like this: I would put some commonly held beliefs on the board, such as "North Korea is a threat to the United States" or "Kids watch too much TV" or "Gun violence is an increasing problem." Then I probe those commonplace ideas with the question, "How do you know that?" The point of this exercise is to observe that very few of our beliefs come from actual direct experience. I've never been to Korea, and I've never done any study of TV watching. Instead, I learn these facts and opinions through the mass media. Some of this received wisdom is objectively true, and some is not. For example, teenagers and young adults watch less TV than any other age group. Whether they watch "too much" is a value judgment based on your own limited experiences and whatever information you've gathered from media sources that you trust. The truth or falsity of these ideas is not as significant as the recognition that ultimately, they're not yours; they're someone else's that you have adopted as your own.
So while my thoughts may be free, they're not entirely mine. I'm not saying this pejoratively. It's just the way we know things in our modern age. And these second-hand thoughts develop enormous power over time, the more they are repeated and accepted. I recall watching an exchange between a presidential candidate and a voter. The voter said, "Why should I vote for you when you don't have a chance?" The candidate's reply was, "If you vote for me, then I'll have a chance!" Unfortunately, the power of received ideas is such that repetition gives them a sort of "truth" in the sense of being universally accepted. Step outside what all the authorities agree on, and you are a crackpot.
I don't mean to suggest that we're all just puppets of the media. Only the most dedicated conspiracy hounds think that. But there is a subtle influence that works on us all the time to think within certain boundaries, along certain lines. In my academic field this is called the agenda-setting function of the media. The media do not tell us what to think, but they tell us what to think about. Nobody just hears a news story or sees an advertisement and then simple-mindedly believes everything it says. But through the gradual process of repetition and prioritizing, certain viewpoints and ideas become our own, and we can hardly recall where we got them. Sometimes this influence can be good. Think of the social shift that has occurred within a single generation about seat belts, for example, or smoking. I can remember when I was in high school, how my classmates and I would debate about whether seat belts were sensible or useful. Today I feel naked without one on, and it's not because of personal experience. It's through the change in attitudes we've all experienced by the pressure of received opinion over time.
On the other hand, agenda-setting sometimes just perpetuates false or simple-minded ideas. You can see that in the narrow and constricted thinking about what constitutes beauty, or who is considered beautiful. Or in fads and crazes. There's a motive behind a lot of this guided thinking, of course. There's money to be made in keeping us from thinking too much. Advertisers have a term called "brand image." Brand image is what you use to sell a product that is indistinguishable from its competitors, like bottled water or pain relievers. You concoct an image of your product that makes people think it's different. It depends on consumers not applying their reason or independent consideration, but responding unthinkingly to the appeal of the product. And the amazing thing is, it works. Just ask the folks at Eveready batteries, whose "Energizer bunny" was the most successful ad campaign of the 1980s, and which never made a single claim about the product that couldn't be made by any other battery manufacturer.
Now that a presidential election is looming on the horizon, we are all getting to experience that uncomfortable situation of deciding whether to unfriend or hide people on our Facebook news feed because of the ignorant opinions they are expressing, or the aggressive way in which they express them. And most of the ideas that are swapped on the Internet are definitely second-hand, and not intended to promote clarity or independent thinking. And I'll confess, I'm just as guilty of sloppy thinking as everybody else, which is why I titled this talk "My Favorite Fallacy." You have probably seen those charts that go around from time to time, detailing the most common logical fallacies that we use in everyday life. Well, I'm here to acknowledge myself as the practitioner of some of those fallacies, not something to be proud of, to be sure, but there it is.
Let's start with that familiar one, the argumentum ad hominem. This one involves attacking the person rather than the argument. That's one I engage in pretty frequently. But I think we should distinguish between the classic ad hominem argument, in which you attack the source as a way of distracting from the argument, and what I think is a perfectly legitimate thing to do, and that's point out if the source of an idea has a history of error or prevarication. For example, it may be a logical fallacy to say that a column written by Bill Kristol is wrong just because Bill Kristol wrote it, but it's not a bad idea to point out how many times Kristol has been wrong in the past.
Another fallacy that I'll own up to is the one that goes by the common term of "cluster-connection." The idea there is that just because things occur in proximity to each other, they must have some connection. You see this fallacy exposed in the comical graphs people make, pointing out that the stock market appears to rise and fall in accordance with which league wins the World Series, and so forth. I recognize that this is a logical error, but I can't help doing it anyway. It's the principle of circumstantial evidence. I know it's not strictly logical to assume that there's a connection between the unusual car that drives past and the stray dog that appears at my door later that afternoon, but it's not entirely illogical either. So I commit the deductive fallacy but hope to keep it within the bounds of reason.
I'd like to throw in one more complication, too. I've been emphasizing the "conventional" in "conventional wisdom" up to this point, but I should also acknowledge the "wisdom" too. There's as much silliness in being willfully unconventional as there is in being stupidly conventional. I think of Emerson's famous comment about individuality: "A foolish consistency is the hobgoblin of little minds, adored by little statesmen and philosophers and divines. With consistency a great soul has simply nothing to do." The adjective that often gets overlooked there is the "foolish" before the "consistency." It's not consistency itself that is the problem, it's foolish consistency, following the dictates of convention without knowing why or having good reason. It's fine to scorn the herd, but sometimes the herd is heading for the waterhole. Conventional wisdom is sometimes conventional because it's wise.
It seems like the older I get, the more the idea of the wisdom of the elders makes sense to me. What the elders have to offer is accumulated practical experience, the knowledge of what works and what doesn't. The word "orthodox" originally meant "correct thinking." Rejecting the conventional sometimes means rejecting common sense, substituting what you would like to be true for what is true. My "unorthodox ideas" may just be whims. Emerson writes in "Self-Reliance," "I would write on the lintels of the door-post, Whim," but I would not recommend using whim to build your porch.
One of my favorite writers on the self and community is Joan Didion. In her essay "On Morality," Didion reminds us that complete freedom of the self is a prison of its own sort. She writes, "What could be more arrogant than to claim the primacy of personal conscience?" By this I think she means that when we cut ourselves loose from the values and ideas of the tribe, we open up the scary possibility that all we have to rely on for value is ourselves. My brilliant and unorthodox interpretation of the world is just as good as, but no better than, your nutty and cranky one. Because in casting aside other people's standards, I am implicitly tossing out my standing to judge other people along with it. Living in the real world means inhabiting a web of influence and obligation. When we try to free ourselves completely from the thoughts and influences of others, we lose the necessary sense of connectedness and obligation that binds us as a society. And yes, obligation is a part of freedom. Even if one could throw off all the conventions of society, something I don't really think is possible, the loss would be greater than the gain. Didion writes: "'I followed my own conscience.' 'I did what I thought was right.' How many madmen have said it and meant it? How many murderers? Maybe we have all said it, and maybe we have all been wrong."
So where does this leave us? I hope to remind myself more often that when I hear ideas that "everybody knows," to ask myself whether they're true, and to doubt them for a while until I've accepted them for myself. At the same time, I hope to remember that I'm not such a great genius that I can simply reject other people's ideas in favor of my own, no matter how brilliant I find myself to be. And finally, I intend to pay more attention to the interplay between self and others, and to take pleasure in that push and pull of living in a society. When you think of the people we might call the great originals of our day, the thing I notice about them is that they did not exercise their originality in splendid isolation, but instead worked it through the place and time where they lived. They had new ideas, ideas that set them at odds with their peers, but instead of contenting themselves with their originality and their distance from convention, they worked to make their original ideas become the conventional wisdom - to reshape what everyone was thinking. And perhaps that's the best form of originality. Thoughts may be free, but they become valuable when we spend them in our lives.
©2015 Dr. Steve Wiegensein
Wiegensein, Dr. Steve 2015. My Favorite Fallacies, http://www.uuquincy.org /talks/20151025.shtml (accessed January 18, 2020).


HALMASHAURI YA WILAYA YA ILEJE TAREHE 06.02.2017 IMESAINI MKATABA WENYE THAMANI YA TSHS 150,006,246.25 IKIWA NI KWA AJILI YA KAZI YA KUSAKAFIA MFEREJI WA UMWAGILIAJI SASENGA/MBEBE.
HALMASHAURI IMESAINI MKATABA NA KAMPUNI YA GIRSON (023) INVESTMENT LTD, S.L.P 39 WA SUMBAWANGA NA MKATABA HUU UNATEKELEZWA KWA MUDA WA SIKU 90 SAWA NA MUDA WA MIEZI MITATU.
MKATABA HUU UMESAINIWA MBELE YA MHESHIMIWA MWENYEKITI WA HALMASHAURI YA ILEJE NDG. UBATIZO SONGA NA MKURUGENZI MTENDAJI WA HALMASHAURI YA ILEJE NDG. HAJI M. MNASI MBELE YA WAWAKILISHI WA KAMPUNI ILIYOTEULIWA KUTEKELEZA MRADI HUO.


The Center in Asbury Park is seeking volunteers to cook meals for residents at the Third Avenue building. There are on average six to 12 residents who eat in the dining room Saturdays and Sundays.
Chef Karen will help the volunteers order ingredients for the meals. The meals are served from 4:30 to 5:30 p.m. Saturdays and 4 to 5 p.m. on Sundays.
The open dates where volunteers are needed include July 7, 21, 22 and 28, Aug. 4, 18, 25 and 26 and Sept. 21, 22, 23 and 29.
To volunteer contact Patsy Vornhagen at quinnpv@optonline.net or call 732-774-3416 x115.


text:
Kristjan Järvi (Tallin, 13 de junio de 1972) es un director de orquesta y compositor estonio-americano.

Es el hijo pequeño de Neeme Järvi y hermano de Paavo Järvi.

Trayectoria
Cuando Järvi tenía 7 años, su familia emigró a los Estados Unidos y se estableció en Rumson, Nueva Jersey (recibió la ciudadanía estadounidense en 1985). Creció en Nueva York. Järvi estudió piano con Nina Svetlanova en la Escuela de Música de Manhattan. Más tarde pasó a estudiar dirección en la Universidad de Míchigan bajo Kenneth Kiesler.

De 1998 a 2000, Järvi fue director asistente de Esa-Pekka Salonen en la Filarmónica de Los Ángeles. Él y el compositor Gene Pritsker fueron cofundadores en 1993 de Absolute Ensemble, con sede en Nueva York, con Järvi como director musical. En 2007, Järvi y Absolute Ensemble fueron galardonados con el Premio Deutsche Bank al Logro artístico sobresaliente.

Järvi fue director de orquesta y director musical de la Norrlands Opera de 2000 a 2004. De 2004 a 2009, Järvi fue director de orquesta y director musical de la Tonkünstler Orchestra de Viena. Järvi es también el actual asesor artístico de la Kammerorchester Basel y el director y fundador de la Filarmónica del Mar Báltico (anteriormente Filarmónica de la Juventud Báltica). En abril de 2011, Järvi fue nombrado el siguiente director de orquesta de la Orquesta Sinfónica MDR de Leipzig, con vigencia en la temporada 2012-2013, con un contrato inicial de 3 años. Su contrato con la  MDR se amplió en 2015. En marzo de 2017, la MDR anunció que concluirá su contrato después del cierre de la temporada 2017-2018.

Además de una nominación al Grammy, Järvi ha sido galardonado con el German Record Critics Prize y un Grammy sueco por la grabación de la ópera de Hilding Rosenberg "Isle of Bliss". Ha grabado la misa de Leonard Bernstein con la Orquesta Tonkünstler y Absolute Ensemble.

Mientras que el repertorio de Järvi incluye piezas de los períodos Clásico y Romántico, también es especialista en compositores del siglo XX y música contemporánea, y encargó obras de Arvo Pärt, Heinz Karl Gruber, Erkki Sven Tüür, Ezequiel Viñao, Peeter Vähi, Dave Soldier, Joe Zawinul y Gediminas Gelgotas, entre otros. En 2014, Järvi y el sello discográfico francés Naïve Classique lanzaron el 'Kristjan Järvi Sound Project', una serie en curso con grabaciones de todos los ensembles de Järvi.

Järvi ha estado casado dos veces. Tuvo un hijo en su primer matrimonio con la violinista Leila Josefowicz. El matrimonio terminó en divorcio. Järvi y su segunda esposa, la flautista Hayley Melitta, tienen tres hijos. Las actividades filantrópicas de Järvi incluyen la fundación de Orphanage Music Outreach en Estonia y la Absolute Academy en Bremen.

Referencias

Enlaces externos

Nacidos en Tallin
Directores de orquesta de Estados Unidos
Directores de orquesta de Estonia

redpajama_set_name: RedPajamaWikipedia


text:
Episode 5: Rob Bennett | The Value of Coffee and Community
Listen here:
In this episode, I sit down with with my friend Rob Bennett, owner of Cafe Ah-Roma. As we sit and talk in his cafe, bustling with its usual energy, we discuss his 17 year journey, his love for community and helping others, the secret to succeeding when others have failed, and what's different about his chairs that makes people feel welcome.
Rob is sort of like a mayor of food service in the city of Berea, outside of Cleveland, Ohio. Not only has he been committed to providing good food and drink to the community and a great place to hang out and interact, he's also done a ton to help other businesses, build into the youth, and be a positive force in the city. Over 17 years of running his cafe, he's seen a lot and has a ton of great things to share in this interview that will be sure to encourage, instruct and inspire.
What is Rob's favorite type of coffee?
Has Rob ever met a stranger? Everyone has a story.
Rob's love for a particular movie series…
How his business came to be and his desire to make a difference
Live in the moment. Embrace those you run into.
The best part of restaurants is the customer interaction
Repeat business is more important than one-time business
The work Rob and his wife did before launching Cafe Ah-Roma
What happened to their sales when Starbucks and Panera came on the scene
The community of restaurant owners in Berea, all that they offer and how they help each other
What are some of the secrets to making it when others fail? Tenacity!
Always be willing to learn
Be willing to do what needs to be done.
Be patient and look for the right opportunities.
Everything is customer service
What do they do with their chairs to make people feel welcome and invite them to sit down and relax?
What have been some surprising things that have happened over the 17 years?
Rob's entrepreneurial roots
Where to find Rob and Cafe Ah-Roma online:
Where to Subscribe and Review Stories of Starters:
iTunes | Stitcher | RSS | email
I'd love to hear from you! Leave your comment below…
Episode 4: Kurt Maechner | Getting Real About Your Passion
Listen here:  Subscribe on iTunes | Stitcher | RSS |…

redpajama_set_name: RedPajamaCommonCrawl


The Newport Living Room Set boasts a unique design and high quality construction. Unique cross sections on sides and distinctive molding brings the eye toward the tables and sparks conversation. Good sized shelves in the base of each table and within the sliding TV cabinet doors also provide dynamic surface area for storage or display. Tapered feet and fine finishes also give the tables a distinct style that complements a variety of décor. So, these pieces can elevate your style and fit seamlessly into any home.


Modernes Schlafzimmer Weiss Fur Modern Ideen Komplett Gestalten Wei is just one of the many collections of pictures or photos that are on this website. you will get a lot of information about Modernes Schlafzimmer Weiss Fur Modern Ideen Komplett Gestalten Wei in here. We not only provide information about only, you will get a lot more references your Hausideen für Sie. so keep visiting to centrostudicts.info to get the latest information about Hausideen für Sie and Modernes Schlafzimmer Weiss Fur Modern Ideen Komplett Gestalten Wei and more.


' Butterfly Spring Wreath - Sisters, What!
Good morning! I'm Lisa Mabey, and I blog at Mabey She Made It, a simple sewing, crafts, and home decor blog with a classic feel. I'm so glad to be here sharing a little spring wreath with you with cute butterflies. I have a simple uncomplicated style, which makes creating projects easy to do. Follow along as we make this butterfly spring wreath!
Adhere resin flowers to remaining two banner pieces using dimensional foam tape. Your pieces are finished!
Cut three 1-1/2" x 2" pieces of pink paper, and adhere them to three banner pieces with dimensional tape.
Cut your card stock into five 2" x 6" pieces, and punch two holes in the top of each piece with a hole punch to create banner pieces.
Cut or punch butterflies from decorative paper, and curl wings around your finger to give them dimension. Adhere to two banner pieces over the pink strips.
Adhere spring sticker or printed greeting to third pink strip.
String 1/8" ribbon through punched holes, and tie it to your burlap wreath.
While the wreath is a great addition to any home for spring décor, with a little changing, It can be a perfect wreath for the holidays; simply by adding holiday cards. Shutterfly offers a variety of cards perfect for any occasion.
How pretty! This would be great to hang inside so the paper doesn't get messed up in the rain. Thank you for sharing at Motivational Monday Link Party. I can't wait to see what you will share Sunday night again.


Rated 3 out of 5 by Sufia from Quality could be better Overall, the jacket is astheicaly appealing but some improvements can be made with the materials/workmanship. I have had difficulty however finding a coat with an even, full fur. I actually had to purchase and exchange my coat 3 times becuase the fur trim on the hood was always thin/lopsided. First winter wearing the jacket, the stitching inside came undone. For the price, I feel quality of the materials used and workmanship can be better. Competitors I have noticed are offering higher quality for the same price range, but I gave mackage a go becuase I have admired the fashion house.
Rated 2 out of 5 by _harmaniac from Zipper problems I bought the coat about a year and a half ago. The zipper because detached on the inner layer. I went back and said I'd like a repair or new coat and was subsequently denied. Very disappointing as it is not supposed to be a cheap product and I got terrible customer service.
Rated 2 out of 5 by Sonia from Beautiful Coat but poorly made. After just a month or owning my Mackage I noticed scuff marks and scratches form on the sleeves. I tried wiping them off with damp towel but it was actual Damage to the polyester. Couldn't figure out what was causing the scratches but finally realized it's from the pocket zippers. When I put my hands in my pockets the zipper rubs against the sleeves of the coat and creates scratches. For a coat that costs over the $1000 I wish Mackage would have taken this into consideration. Plus when I emailed Mackage regarding this issue in April 2018, I didn't get a response until September 2018 and I still haven't been able to send the coat in for a repair. Since September, I just get an email monthly saying they will let me know when they are ready for US shipments for repairs. It's a gorgeous coat, but very poorly engineered with scratches and some seams coming out within 6 months. Especially if you get the hunter green color the scratches are very visible. Moncler might be a better option.
Rated 4 out of 5 by mm6lover from Very warm coat, good investment Bought this last winter at the Mackage store. Both me and my mom have this coat in blue (size XS and S). I'm very scared of the cold and this coat keeps my entire body warm. I get sick easily but I don't get sick whenever I wear this out. The reason why I gave 4 stars instead of 5 is because the fur in real life isn't as thick and fluffy as they look on the website. Also I find it a bit bulky and heavy. I ended up buying this coat anyway because 1) I needed to walk outside a lot for my Eurotrip. 2) My mom's recommendation. She bought her's a few winters ago and swear by it. I also have the short version (AKIVA in XXS) and it wasn't warm at all for some reason. With the AKIVA coat, the fur was so uneven that I had to send it back to Mackage to have them restitch a new hood on it - and I'm still not happy with the results lol. I believe they have some quality control issues.
Rated 5 out of 5 by reynoldsre from THE ONLY WINTER COAT YOU'LL EVER NEED I bought this jacket in November 2016 and it was the best purchase I've ever made. This jacket is so warm, durable and so stylish. It's such a good length - not too long or short (I'm 5'6). My jacket has been through 2 tough Canadian winters and still looks and feels like the day I bought it - worth the investment.
Rated 5 out of 5 by shopaholic123 from MUST HAVE WINTER COAT I bought the Trish Coat last winter and I absolutely love it. I get cold very easily but the coat keeps me really warm. The length of the coat is perfect - I'm 5'2 and the coat length doesn't drown me out. The belt detail on the back cinches in the waist making the coat appear more fitted than a normal puffy winter coat. I highly recommend this coat!


today was action-packed with prepping for and attending crystal couture's green gone glam event. here are some photos from TranquiliT's feature on the runway which was uber-exciting. ana and moi were busily fitting the models, choosing their shoes, and setting up the TranquiliT booth. note the photo of moi coming out at the end with the models - felt so project runway!
one designer at the event was em of goodwill fashions and she's fabulous! LOVE the reuse of goodwill clothing. genius! we hope to have her at the showroom to lead a class soon on remaking your old clothing. check her out.
the first edition of the spring lookbook is out and the items will be available late march. check out spring at tranquilit.com/spring09.pdf. yay! requested lab dips for fall yesterday. any color requests?
very project runway! love the spring lookbook, too.
how about 'jade' (some fab shade of deep green) for fall?
wow, how so exciting!! congrats!


Focus POS has the ability to Integrate with almost all of the credit card processors in the industry.
With our technology platform integrated to Focus's POS system, you will receive more than just payment processing services, you will have a complete business management solution.
Select your own credit card processor based on your unique needs.
Key features you should look when selecting your credit card processor.
Free 24/7 customer care technical support.
Online Reporting or quick access to your payment data.
Short term contracts. Some Companies offer no contracts al all.
Business protection. Ask how they can help you protect your business.


Format introduction Encapsulated PostScript (EPS) is a DSC-conforming PostScript document with additional restrictions which is intended to be usable as a graphics file format. In other words, EPS files are more-or-less self-contained, reasonably predictable PostScript documents that describe an image or drawing and can be placed within another PostScript document.
Technical details At minimum, an EPS file contains a BoundingBox DSC comment, describing the rectangle containing the image described by the EPS file. Applications can use this information to lay out the page, even if they are unable to directly render the PostScript inside.
Описание формата EPS, чуть ниже представлены доступные конвертации из EPS и в EPS. Если вы не нашли нужный тип конвертации, ничего страшного, напишите нам и возможно мы сможем решить вашу проблему.


text:
Le vélodrome de Genève est un vélodrome situé à Genève, en Suisse. Il fait partie du centre sportif de la Queue d'Arve.

Histoire
Le vélodrome de Genève ouvre en . Peu après, l'Écossais Graham Obree tente le record de l'heure sur la piste genevoise sans toutefois y parvenir.

En 2018, le revêtement du vélodrome, en pin de Sibérie, a fait son temps est il remplacé à l'automne par un anneau en frêne d'Autriche, plus rapide et plus confortable pour les coureurs.

Caractéristiques
Le vélodrome de Genève est long de , large de  et haut de .

La halle d'une longueur de , d'une largeur de  et d'une hauteur de  mesure . Elle contient une piste en bois de  et une tribune d'environ .

Le centre de la piste compte une surface utilisable de .

Compétitions
 Quatre Jours de Genève.

Notes et références

Article connexe
 Liste de vélodromes dans le monde

Lien externe

Équipement sportif achevé en 1991
Stade multifonction en Suisse
Genève
Genève
Stade portant le nom d'une ville
Sport dans le canton de Genève
Cyclisme sur piste
Bâtiment dans le canton de Genève


text:
[Webinar] Litigation Update: Investigating Title VI and Title IX Complaints
January 20, 2022	at 1:00 PM ET
Please register to attend this virtual event.
Title IX of the Education Amendments of 1972 supplemented Title VI of the Civil Rights Act of 1964 to include, in addition to barring discrimination on the ground of race, color, or national origin, sex as a protected class in federally funded education programs or activities. The purpose of enacting Title IX was to ensure that everyone, regardless of sex, would enjoy a discrimination-free educational experience.
In the years since their enactment, observers have accused colleges and universities of violating Titles VI and IX in various ways. Many Title IX concerns have involved single-sex, female-only programs, scholarships, awards, fellowships, camps, clubs, etc. Others have involved single-sex, male-only programs. And recently, programs or scholarships for BIPOC-only or people of color have invoked Title VI concerns. One such observer of these potential civil rights violations is professor emeritus of economics at the University of Michigan, Mark Perry.
Over the last three years, Professor Perry has identified more than 1,200 Title IX and Title VI alleged violations and has filed complaints with the Department of Education's Office for Civil Rights (OCR) against nearly 400 colleges and universities which have resulted in nearly 200 federal investigations and more than 100 resolutions, mostly in his favor.
However, after years of this work, Professor Perry announced recently that he has noticed what he describes as a "significant departure from past practices" in what OCR now requires of Title VI and Title IX complaints. Please join us for an update from Professor Perry on his civil rights advocacy and what he views as "troubling signs" at the Biden-Cardona-Lhamon OCR for a discrimination-free educational experience for all.
Mark J. Perry
Professor of Economics, University of Michigan-Flint and
Resident Scholar, American Enterprise Institute
Devon Westhill
President and General Counsel
Center for Equal Opportunity
Race & Sex
Federalist Society's Civil Rights Practice Group


text:
Walter Catlett, född 4 februari 1889 i San Francisco, Kalifornien, död 14 november 1960 i Woodland Hills, Kalifornien, var en amerikansk skådespelare. Catlett debuterade på Broadway på 1910-talet, och filmdebuterade under stumfilmseran. Han spelade mestadels komiska roller och medverkade i över 150 filmer.

Catlett har en stjärna på Hollywood Walk of Fame för sina insatser inom film vid 1700 Vine Street.

Filmografi

Källor

Externa länkar

Amerikanska skådespelare
Födda 1889
Avlidna 1960
Män


A cloudy Friday night in central Tampere. The weather might have not been great but there was a sizable crowd of metalheads gathered at the local stadium. Why, you might ask? Three of the country's biggest metal bands have come here to play a show.
Overall, it's been a memorable evening. Sonata Arctica's show was pretty much what I expected it to be. Children of Bodom put on a good show but they were better the previous time that I saw them. Nightwish exceeded my expectations with a fantastic show that I won't be forgetting any time soon.
OK, this is a good one… I mean really damn good. I don't usually listen to power metal, but when I do, this is the kind of band I like. Sonata Arctica and their newest release Pariah's Child gave me exactly what I wanted from this type of album. This is my first time listening to them, so I can say, if you have never heard of them or have just never got around to listening to them, this album is a great jumping on point. That being said, I do feel the album is a bit of a grower, it took me a couples of straight listens to truly get in to it.
The record starts well with great sounding production, solid riffs, a creative lyrical style all in all the signs of a decently composed record, and this sets a good atmosphere for the album to come. Track one is the lead in single, The Wolves Die Young, a great intro that keeps to the bare bones of the the genre's formula, it's light hearted and has some nice twinkly synth happening in the back of the production. However, it's only when you truly think about the lyrics of this song, that you get the general ideas and themes this album is trying to convey; in short, it's about the regret of an elder generation, and the crimes of today having to live on through our youth.
It definitely took a few listens but the album is littered with this symbolic language, in it's lyrics and even in the atmosphere and tone of the music itself. The most blunt example of this type of writing, would be in the song What Did You Do In The War, Dad. To be honest I just thought this was another typical power metal song. Well it is about war and conflict, set to fast power chords, and fast bass-drum kicks. You know… the usual song and dance. However, this verse caught me off guard, "What did you do in the war, dad, tell me, Why can't you smile when the children sing, Did the wages of war cut your soaring wings, And your soul is now torn, unlike mine, Do you fear yesterday will in someway, Define the life of your child?" This line goes by so quickly you don't fully hear it the first time. It's subtle and simultaneously powerful. This line shows a guilt-ridden father struggling to deal with the present, because he feels guilty about the past, and then, putting those mental burdens on his child. The child then realises, that their dad may never be the same person and as a result, the child must grow with these mental strains as well. It makes you think about the subject matter but not so much as to ruin the enjoyment of the record, it's just great writing, nothing more, nothing less.
If I step aside from the lyrics and talk about the music for just a moment. I would say for the most part it's very well written, it's catchy and fun with a lot of great riffs and hooks. There appear to a lot of odes and nods to classic rock and that gives the songs some interesting grooves to hear, check out the songs Half a Marathon Man & X Marks the Spot to see what I mean. The melodies are well crafted and set an interesting tone for every song. Especially in the ballads, which this album is not short of… Nope, you can't have a power metal album without the slow songs, and usually they're the weakest part of the genre, but Sonata Arctica find a way to make them sound great and give them sense of sincerity. Again, this is a sign brilliantly written music. The song Love could have just been a typical metal ballad, but the band takes their time with it and allows the song to build slowly and naturally, then, the big metal chords come in at the end. It's just so great to hear in this type of music.
OK, so any songs in particular to check out? Well, I would say just buy the album, but if you're looking for a sample to get your interest going, I would recommend the track Cloud Factory. It has a fun and bouncy beat, creative and poetic language and it's probably the most interesting song on the album, considering its premise. Overall though, this is a great record, I don't think I've had as much fun listening to an album in a while. Great tunes, beautiful atmosphere and just enjoyable, check it out.


When a player is on injured reserve, he's not supposed to have any impact on his team's games. New York Jets guard Willie Colon bucked that trend on Sunday, however.
While in street clothes and on the sideline, Colon was flagged for a 15-yard unsportsmanlike conduct penalty for talking trash to Dominique Rodgers-Cromartie. The penalty negated a first down by the Jets, which understandably didn't sit well with head coach Todd Bowles.
"The look that man [Bowles] gave me, it pierced my soul," Colon said via Rich Cimini of ESPN. "Coach, I'm sorry. My team, I'm sorry. And it won't happen again."
But what exactly happened on the play to lead to the flag?
"When that play happened, me and [DRC] kind of got in a verbal back and forth, if you will," Colon said. "Decker beat him on the play. He came to me. I've never [been one] to back down. I had some un-Christian-like words to say back. The ref saw it."
Colon was obviously apologetic for the gaffe, and he's fortunate the Jets came away with the win. Had that penalty cost the Jets a victory, he likely wouldn't have too many friends in the locker room for a little while.


The study of the melting and compression of the liquid for the 3d metals has not only a fundamental interest but also geophysical and planetary implications. The core of rocky planets is actually mainly composed of iron alloyed with nickel and light elements. The understanding of the behavior of such materials under extreme conditions, especially in the liquid phase, can give some important insights in the understanding of the properties, such as temperature, composition, magnetic field etc. of several planets. In this framework we performed a case study of melting curve and compression of liquid nickel and cobalt. While nickel is itself present in the core of several planets, the interest of cobalt mainly lies in its electronic and structural similarity to iron, being very close in the periodic table. The structural study of highly compressed melts requires the use of a technique able to detect the solid-liquid transition at different pressures and to measure the average distance between atoms. For its short-range order sensitivity and element selectivity, X-ray absorption spectroscopy (XAS) is a suitable technique for the purpose. It was used in the work shown in this presentation to detect the melting of 3d metals such as iron, nickel and cobalt under extreme conditions of pressure and temperature. A validation of the XAS melting criterion is also provided, by means of a morphologic study of the heated samples and DFT calculations. Information about the local environment of a specific element in the material under analysis can also be extracted, and this was performed for the first time on nickel and cobalt up to 100 GPa and 4000 K. The evolution with pressure of the distance between first neighbors is compared to calculations in the literature. Discrepancies (and similarities) are discussed in the framework of different models.
The work performed on nickel and cobalt opens the way to the study of multi-element systems such as iron alloyed with nickel and light elements, with very strong implications for the study of the interior of rocky planets.


The unnecessary gif brigade has returned; the TTV message boards will insta run out of space and Eljay will be forced to sell his kneecaps to keep the site up and running.
...Or at least that's what the excuse was for locking the Bionicle memes topic.
The gifs are too much.
The gifs are not enough.
@Tarvaax and @BlueCel so I could see them fight.
Heh, I know it's a joke but I actually think he is pretty cool. And now that you mention it.... Hmmm idk who I would like to meet, too many chill guys in here to write them all up.
@BlueCel I know right? Everyone's so chill, and being chill is cool. I'd kind of like to see every chill person on here just chillin' with each other. To be crystal clear, I'd probably be fine with meeting anyone on here, so long as coffee is involved.
Now really though I think I wouldn't care who to meet from these message boards. Most people are nice.
By Tahu's 2015 cheeks...what the heck?
I'd like to meet @Eljay someay, and hopefully @Chro whose mocs I've been a fan of for years.
Anyone I can argue with, cos it is better face to face.
We could play Halo 2 Co-Op.


My name is Libby Jensen, I've been guiding for Western for a while and I love it out here. If you are a mom or a dad and you are trying to figure out a cool family vacation for your family, come down Desolation Canyon. It is awesome! It is a great family trip. You are out here in Desolation for about 4 or days depending on the season. It is so fun because it's like you are in the wild west. It's really like you are here in the time of Butch Cassidy and the Wild Bunch.
So it's amazing to see that. You are camping when you come down Desolation Canyon, it is an outdoor experience. You might catch a glimpse of a bear or something. Families just bond. The experiences that you go through, the fun times you have, the stories you have will last a lifetime.
The stars that you see, you see the Milky Way, you see all the galaxies, it's amazing. And sometimes we'll have the moon come out and it's almost like a flashlight. It's like you can make shadow puppets with the moon. At night time, you get to sleep on your cot, look up at the stars, listen to guitar music, Desolation is fantastic!
Day and night the scenery is unbeatable. The Western Way is the best way! My name is Libby, I am studying nursing and I am a Western River Expedition guide.
Every bend is a new sight, a new adventure. You are surrounded by this beauty all the time, all day long.


text:
// ==++==
//
//   Copyright (c) Microsoft Corporation.  All rights reserved.
//
// ==--==

//
// X509Certificate2Collection.cs
//

namespace System.Security.Cryptography.X509Certificates {
    using System;
    using System.Collections;
    using System.Globalization;
    using System.IO;
    using System.Runtime.InteropServices;
    using System.Runtime.InteropServices.ComTypes;
    using System.Security.Cryptography;
    using System.Security.Permissions;
    using System.Text;
    using System.Runtime.Versioning;

    using _FILETIME = System.Runtime.InteropServices.ComTypes.FILETIME;

    public enum X509FindType {
        FindByThumbprint                = 0,
        FindBySubjectName               = 1,
        FindBySubjectDistinguishedName  = 2,
        FindByIssuerName                = 3,
        FindByIssuerDistinguishedName   = 4,
        FindBySerialNumber              = 5,
        FindByTimeValid                 = 6,
        FindByTimeNotYetValid           = 7,
        FindByTimeExpired               = 8,
        FindByTemplateName              = 9,
        FindByApplicationPolicy         = 10,
        FindByCertificatePolicy         = 11,
        FindByExtension                 = 12,
        FindByKeyUsage                  = 13,
        FindBySubjectKeyIdentifier      = 14
    }

    public class X509Certificate2Collection : X509CertificateCollection {
        public X509Certificate2Collection() {}

        public X509Certificate2Collection(X509Certificate2 certificate) {
            this.Add(certificate);
        }

        public X509Certificate2Collection(X509Certificate2Collection certificates) {
            this.AddRange(certificates);
        }

        public X509Certificate2Collection(X509Certificate2[] certificates) {
            this.AddRange(certificates);
        }

        public new X509Certificate2 this[int index] {
            get {
                return (X509Certificate2) List[index];
            }
            set {
                if (value == null)
                    throw new ArgumentNullException("value");
                List[index] = value;
            }
        }

        public int Add(X509Certificate2 certificate) {
            if (certificate == null)
                throw new ArgumentNullException("certificate");

            return List.Add(certificate);
        }

        public void AddRange(X509Certificate2[] certificates) {
            if (certificates == null)
                throw new ArgumentNullException("certificates");

            int i=0;
            try {
                for (; i<certificates.Length; i++) {
                    Add(certificates[i]);
                }
            } catch {
                for (int j=0; j<i; j++) {
                    Remove(certificates[j]);
                }
                throw;
            }
        }

        public void AddRange(X509Certificate2Collection certificates) {
            if (certificates == null)
                throw new ArgumentNullException("certificates");

            int i = 0;
            try {
                foreach (X509Certificate2 certificate in certificates) {
                    Add(certificate);
                    i++;
                }
            } catch {
                for (int j=0; j<i; j++) {
                    Remove(certificates[j]);
                }
                throw;
            }
        }

        public bool Contains(X509Certificate2 certificate) {
            if (certificate == null)
                throw new ArgumentNullException("certificate");

            return List.Contains(certificate);
        }

        public void Insert(int index, X509Certificate2 certificate) {
            if (certificate == null)
                throw new ArgumentNullException("certificate");

            List.Insert(index, certificate);
        }

        public new X509Certificate2Enumerator GetEnumerator() {
            return new X509Certificate2Enumerator(this);
        }

        public void Remove(X509Certificate2 certificate) {
            if (certificate == null)
                throw new ArgumentNullException("certificate");

            List.Remove(certificate);
        }

        public void RemoveRange(X509Certificate2[] certificates) {
            if (certificates == null)
                throw new ArgumentNullException("certificates");

            int i=0;
            try {
                for (; i<certificates.Length; i++) {
                    Remove(certificates[i]);
                }
            } catch {
                for (int j=0; j<i; j++) {
                    Add(certificates[j]);
                }
                throw;
            }
        }

        public void RemoveRange(X509Certificate2Collection certificates) {
            if (certificates == null)
                throw new ArgumentNullException("certificates");

            int i = 0;
            try {
                foreach (X509Certificate2 certificate in certificates) {
                    Remove(certificate);
                    i++;
                }
            } catch {
                for (int j=0; j<i; j++) {
                    Add(certificates[j]);
                }
                throw;
            }
        }

#if FEATURE_CORESYSTEM
        [SecuritySafeCritical]
#endif
        public X509Certificate2Collection Find(X509FindType findType, Object findValue, bool validOnly) {
#if !FEATURE_CORESYSTEM
            //
            // We need to Assert all StorePermission flags since this is a memory store and we want
            // semi-trusted code to be able to find certificates in a memory store.
            //

            StorePermission sp = new StorePermission(StorePermissionFlags.AllFlags);
            sp.Assert();
#endif

            SafeCertStoreHandle safeSourceStoreHandle = X509Utils.ExportToMemoryStore(this);

            SafeCertStoreHandle safeTargetStoreHandle = FindCertInStore(safeSourceStoreHandle, findType, findValue, validOnly);
            X509Certificate2Collection collection = X509Utils.GetCertificates(safeTargetStoreHandle);

            safeTargetStoreHandle.Dispose();
            safeSourceStoreHandle.Dispose();

            return collection;
        }

        public void Import(byte[] rawData) {
            Import(rawData, null, X509KeyStorageFlags.DefaultKeySet);
        }

#if FEATURE_CORESYSTEM
        [SecuritySafeCritical]
#endif
        public void Import(byte[] rawData, string password, X509KeyStorageFlags keyStorageFlags) {
            uint dwFlags = X509Utils.MapKeyStorageFlags(keyStorageFlags);
            SafeCertStoreHandle safeCertStoreHandle = SafeCertStoreHandle.InvalidHandle;

#if !FEATURE_CORESYSTEM
            //
            // We need to Assert all StorePermission flags since this is a memory store and we want
            // semi-trusted code to be able to import certificates to a memory store.
            //

            StorePermission sp = new StorePermission(StorePermissionFlags.AllFlags);
            sp.Assert();
#endif

            safeCertStoreHandle = LoadStoreFromBlob(rawData, password, dwFlags, (keyStorageFlags & X509KeyStorageFlags.PersistKeySet) != 0);

            X509Certificate2Collection collection = X509Utils.GetCertificates(safeCertStoreHandle);

            safeCertStoreHandle.Dispose();
            X509Certificate2[] x509Certs = new X509Certificate2[collection.Count];
            collection.CopyTo(x509Certs, 0);
            this.AddRange(x509Certs);
        }

        [ResourceExposure(ResourceScope.Machine)]
#if !FEATURE_CORESYSTEM
        [ResourceConsumption(ResourceScope.Machine)]
#endif
        public void Import(string fileName) {
            Import(fileName, null, X509KeyStorageFlags.DefaultKeySet);
        }

#if FEATURE_CORESYSTEM
        [SecuritySafeCritical]
#endif
        [ResourceExposure(ResourceScope.Machine)]
#if !FEATURE_CORESYSTEM
        [ResourceConsumption(ResourceScope.Machine)]
#endif
        public void Import(string fileName, string password, X509KeyStorageFlags keyStorageFlags) {
            uint dwFlags = X509Utils.MapKeyStorageFlags(keyStorageFlags);
            SafeCertStoreHandle safeCertStoreHandle = SafeCertStoreHandle.InvalidHandle;

#if !FEATURE_CORESYSTEM
            //
            // We need to Assert all StorePermission flags since this is a memory store and we want
            // semi-trusted code to be able to import certificates to a memory store.
            //

            StorePermission sp = new StorePermission(StorePermissionFlags.AllFlags);
            sp.Assert();
#endif

            safeCertStoreHandle = LoadStoreFromFile(fileName, password, dwFlags, (keyStorageFlags & X509KeyStorageFlags.PersistKeySet) != 0);

            X509Certificate2Collection collection = X509Utils.GetCertificates(safeCertStoreHandle);

            safeCertStoreHandle.Dispose();
            X509Certificate2[] x509Certs = new X509Certificate2[collection.Count];
            collection.CopyTo(x509Certs, 0);
            this.AddRange(x509Certs);
        }

#if FEATURE_CORESYSTEM
        [SecuritySafeCritical]
#endif
        public byte[] Export(X509ContentType contentType) {
            return Export(contentType, null);
        }

#if FEATURE_CORESYSTEM
        [SecuritySafeCritical]
#endif
        public byte[] Export(X509ContentType contentType, string password) {
#if !FEATURE_CORESYSTEM
            //
            // We need to Assert all StorePermission flags since this is a memory store and we want
            // semi-trusted code to be able to export certificates to a memory store.
            //

            StorePermission sp = new StorePermission(StorePermissionFlags.AllFlags);
            sp.Assert();
#endif

            SafeCertStoreHandle safeCertStoreHandle = X509Utils.ExportToMemoryStore(this);

            byte[] result = ExportCertificatesToBlob(safeCertStoreHandle, contentType, password);
            safeCertStoreHandle.Dispose();
            return result;
        }

#if FEATURE_CORESYSTEM
        [SecurityCritical]
#endif
        private unsafe static byte[] ExportCertificatesToBlob(SafeCertStoreHandle safeCertStoreHandle, X509ContentType contentType, string password) {
            SafeCertContextHandle safeCertContextHandle = SafeCertContextHandle.InvalidHandle;
            uint dwSaveAs = CAPI.CERT_STORE_SAVE_AS_PKCS7;
            byte[] pbBlob = null;
            CAPI.CRYPTOAPI_BLOB DataBlob = new CAPI.CRYPTOAPI_BLOB();
            SafeLocalAllocHandle pbEncoded = SafeLocalAllocHandle.InvalidHandle;

            switch(contentType) {
            case X509ContentType.Cert:
                safeCertContextHandle = CAPI.CertEnumCertificatesInStore(safeCertStoreHandle, safeCertContextHandle);
                if (safeCertContextHandle != null && !safeCertContextHandle.IsInvalid) {
                    CAPI.CERT_CONTEXT pCertContext = *((CAPI.CERT_CONTEXT*) safeCertContextHandle.DangerousGetHandle());
                    pbBlob = new byte[pCertContext.cbCertEncoded];
                    Marshal.Copy(pCertContext.pbCertEncoded, pbBlob, 0, pbBlob.Length);
                }
                break;

            case X509ContentType.SerializedCert:
                safeCertContextHandle = CAPI.CertEnumCertificatesInStore(safeCertStoreHandle, safeCertContextHandle);
                uint cbEncoded = 0;
                if (safeCertContextHandle != null && !safeCertContextHandle.IsInvalid) {
                    if (!CAPI.CertSerializeCertificateStoreElement(safeCertContextHandle,
                                                                   0,
                                                                   pbEncoded,
                                                                   new IntPtr(&cbEncoded)))
                        throw new CryptographicException(Marshal.GetLastWin32Error());
                    pbEncoded = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(cbEncoded));
                    if (!CAPI.CertSerializeCertificateStoreElement(safeCertContextHandle,
                                                                   0,
                                                                   pbEncoded,
                                                                   new IntPtr(&cbEncoded)))
                        throw new CryptographicException(Marshal.GetLastWin32Error());

                    pbBlob = new byte[cbEncoded];
                    Marshal.Copy(pbEncoded.DangerousGetHandle(), pbBlob, 0, pbBlob.Length);
                }
                break;

            case X509ContentType.Pkcs12:
                if (!CAPI.PFXExportCertStore(safeCertStoreHandle,
                                             new IntPtr(&DataBlob),
                                             password,
                                             CAPI.EXPORT_PRIVATE_KEYS | CAPI.REPORT_NOT_ABLE_TO_EXPORT_PRIVATE_KEY))
                    throw new CryptographicException(Marshal.GetLastWin32Error());

                pbEncoded = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(DataBlob.cbData));
                DataBlob.pbData = pbEncoded.DangerousGetHandle();
                if (!CAPI.PFXExportCertStore(safeCertStoreHandle,
                                             new IntPtr(&DataBlob),
                                             password,
                                             CAPI.EXPORT_PRIVATE_KEYS | CAPI.REPORT_NOT_ABLE_TO_EXPORT_PRIVATE_KEY))
                    throw new CryptographicException(Marshal.GetLastWin32Error());

                pbBlob = new byte[DataBlob.cbData];
                Marshal.Copy(DataBlob.pbData, pbBlob, 0, pbBlob.Length);
                break;

            case X509ContentType.SerializedStore:
                // falling through
            case X509ContentType.Pkcs7:
                if (contentType == X509ContentType.SerializedStore)
                    dwSaveAs = CAPI.CERT_STORE_SAVE_AS_STORE;

                // determine the required length
                if (!CAPI.CertSaveStore(safeCertStoreHandle,
                                        CAPI.X509_ASN_ENCODING | CAPI.PKCS_7_ASN_ENCODING,
                                        dwSaveAs,
                                        CAPI.CERT_STORE_SAVE_TO_MEMORY,
                                        new IntPtr(&DataBlob),
                                        0))
                    throw new CryptographicException(Marshal.GetLastWin32Error());

                pbEncoded = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(DataBlob.cbData));
                DataBlob.pbData = pbEncoded.DangerousGetHandle();
                // now save the store to a memory blob
                if (!CAPI.CertSaveStore(safeCertStoreHandle,
                                        CAPI.X509_ASN_ENCODING | CAPI.PKCS_7_ASN_ENCODING,
                                        dwSaveAs,
                                        CAPI.CERT_STORE_SAVE_TO_MEMORY,
                                        new IntPtr(&DataBlob),
                                        0))
                    throw new CryptographicException(Marshal.GetLastWin32Error());

                pbBlob = new byte[DataBlob.cbData];
                Marshal.Copy(DataBlob.pbData, pbBlob, 0, pbBlob.Length);
                break;

            default:
                throw new CryptographicException(SR.GetString(SR.Cryptography_X509_InvalidContentType));
            }

            pbEncoded.Dispose();
            safeCertContextHandle.Dispose();

            return pbBlob;
        }

#if FEATURE_CORESYSTEM
        [SecurityCritical]
#endif
        internal delegate int FindProcDelegate (SafeCertContextHandle safeCertContextHandle, object pvCallbackData);
#if FEATURE_CORESYSTEM
        [SecuritySafeCritical]
#endif
        private unsafe static SafeCertStoreHandle FindCertInStore(SafeCertStoreHandle safeSourceStoreHandle, X509FindType findType, Object findValue, bool validOnly) {
            if (findValue == null)
                throw new ArgumentNullException("findValue");

            IntPtr pvFindPara = IntPtr.Zero;
            object pvCallbackData1 = null;
            object pvCallbackData2 = null;
            FindProcDelegate pfnCertCallback1 = null;
            FindProcDelegate pfnCertCallback2 = null;
            uint dwFindType = CAPI.CERT_FIND_ANY;
            string subject, issuer;

            CAPI.CRYPTOAPI_BLOB HashBlob = new CAPI.CRYPTOAPI_BLOB();
            SafeLocalAllocHandle pb = SafeLocalAllocHandle.InvalidHandle;
            _FILETIME ft = new _FILETIME();
            string oidValue = null;

            switch(findType) {
            case X509FindType.FindByThumbprint:
                if (findValue.GetType() != typeof(string))
                    throw new CryptographicException(SR.GetString(SR.Cryptography_X509_InvalidFindValue));
                byte[] hex = X509Utils.DecodeHexString((string) findValue);
                pb = X509Utils.ByteToPtr(hex);
                HashBlob.pbData = pb.DangerousGetHandle();
                HashBlob.cbData = (uint) hex.Length;
                dwFindType = CAPI.CERT_FIND_HASH;
                pvFindPara = new IntPtr(&HashBlob);
                break;

            case X509FindType.FindBySubjectName:
                if (findValue.GetType() != typeof(string))
                    throw new CryptographicException(SR.GetString(SR.Cryptography_X509_InvalidFindValue));
                subject = (string) findValue;
                dwFindType = CAPI.CERT_FIND_SUBJECT_STR;
                pb = X509Utils.StringToUniPtr(subject);
                pvFindPara = pb.DangerousGetHandle();
                break;

            case X509FindType.FindBySubjectDistinguishedName:
                if (findValue.GetType() != typeof(string))
                    throw new CryptographicException(SR.GetString(SR.Cryptography_X509_InvalidFindValue));
                subject = (string) findValue;
                pfnCertCallback1 = new FindProcDelegate(FindSubjectDistinguishedNameCallback);
                pvCallbackData1 = subject;
                break;

            case X509FindType.FindByIssuerName:
                if (findValue.GetType() != typeof(string))
                    throw new CryptographicException(SR.GetString(SR.Cryptography_X509_InvalidFindValue));
                issuer = (string) findValue;
                dwFindType = CAPI.CERT_FIND_ISSUER_STR;
                pb = X509Utils.StringToUniPtr(issuer);
                pvFindPara = pb.DangerousGetHandle();
                break;

            case X509FindType.FindByIssuerDistinguishedName:
                if (findValue.GetType() != typeof(string))
                    throw new CryptographicException(SR.GetString(SR.Cryptography_X509_InvalidFindValue));
                issuer = (string) findValue;
                pfnCertCallback1 = new FindProcDelegate(FindIssuerDistinguishedNameCallback);
                pvCallbackData1 = issuer;
                break;

            case X509FindType.FindBySerialNumber:
                if (findValue.GetType() != typeof(string))
                    throw new CryptographicException(SR.GetString(SR.Cryptography_X509_InvalidFindValue));
                pfnCertCallback1 = new FindProcDelegate(FindSerialNumberCallback);
                pfnCertCallback2 = new FindProcDelegate(FindSerialNumberCallback);
                BigInt h = new BigInt();
                h.FromHexadecimal((string) findValue);
                pvCallbackData1 = (byte[]) h.ToByteArray();
                h.FromDecimal((string) findValue);
                pvCallbackData2 = (byte[]) h.ToByteArray();
                break;

            case X509FindType.FindByTimeValid:
                if (findValue.GetType() != typeof(DateTime))
                    throw new CryptographicException(SR.GetString(SR.Cryptography_X509_InvalidFindValue));
                *((long*) &ft) = ((DateTime) findValue).ToFileTime();
                pfnCertCallback1 = new FindProcDelegate(FindTimeValidCallback);
                pvCallbackData1 = ft;
                break;

            case X509FindType.FindByTimeNotYetValid:
                if (findValue.GetType() != typeof(DateTime))
                    throw new CryptographicException(SR.GetString(SR.Cryptography_X509_InvalidFindValue));
                *((long*) &ft) = ((DateTime) findValue).ToFileTime();
                pfnCertCallback1 = new FindProcDelegate(FindTimeNotBeforeCallback);
                pvCallbackData1 = ft;
                break;

            case X509FindType.FindByTimeExpired:
                if (findValue.GetType() != typeof(DateTime))
                    throw new CryptographicException(SR.GetString(SR.Cryptography_X509_InvalidFindValue));
                *((long*) &ft) = ((DateTime) findValue).ToFileTime();
                pfnCertCallback1 = new FindProcDelegate(FindTimeNotAfterCallback);
                pvCallbackData1 = ft;
                break;

            case X509FindType.FindByTemplateName:
                if (findValue.GetType() != typeof(string))
                    throw new CryptographicException(SR.GetString(SR.Cryptography_X509_InvalidFindValue));
                pvCallbackData1 = (string) findValue;
                pfnCertCallback1 = new FindProcDelegate(FindTemplateNameCallback);
                break;

            case X509FindType.FindByApplicationPolicy:
                if (findValue.GetType() != typeof(string))
                    throw new CryptographicException(SR.GetString(SR.Cryptography_X509_InvalidFindValue));
                // If we were passed the friendly name, retrieve the value string.
                oidValue = X509Utils.FindOidInfoWithFallback(CAPI.CRYPT_OID_INFO_NAME_KEY, (string) findValue, OidGroup.Policy);
                if (oidValue == null) {
                    oidValue = (string) findValue;
                    X509Utils.ValidateOidValue(oidValue);
                }
                pvCallbackData1 = oidValue;
                pfnCertCallback1 = new FindProcDelegate(FindApplicationPolicyCallback);
                break;

            case X509FindType.FindByCertificatePolicy:
                if (findValue.GetType() != typeof(string))
                    throw new CryptographicException(SR.GetString(SR.Cryptography_X509_InvalidFindValue));
                // If we were passed the friendly name, retrieve the value string.
                oidValue = X509Utils.FindOidInfoWithFallback(CAPI.CRYPT_OID_INFO_NAME_KEY, (string)findValue, OidGroup.Policy);
                if (oidValue == null) {
                    oidValue = (string) findValue;
                    X509Utils.ValidateOidValue(oidValue);
                }
                pvCallbackData1 = oidValue;
                pfnCertCallback1 = new FindProcDelegate(FindCertificatePolicyCallback);
                break;

            case X509FindType.FindByExtension:
                if (findValue.GetType() != typeof(string))
                    throw new CryptographicException(SR.GetString(SR.Cryptography_X509_InvalidFindValue));
                // If we were passed the friendly name, retrieve the value string.
                oidValue = X509Utils.FindOidInfoWithFallback(CAPI.CRYPT_OID_INFO_NAME_KEY, (string)findValue, OidGroup.ExtensionOrAttribute);
                if (oidValue == null) {
                    oidValue = (string) findValue;
                    X509Utils.ValidateOidValue(oidValue);
                }
                pvCallbackData1 = oidValue;
                pfnCertCallback1 = new FindProcDelegate(FindExtensionCallback);
                break;

            case X509FindType.FindByKeyUsage:
                // The findValue object can be either a friendly name, a X509KeyUsageFlags enum or an integer.
                if (findValue.GetType() == typeof(string)) {
                    CAPI.KEY_USAGE_STRUCT[] KeyUsages = new CAPI.KEY_USAGE_STRUCT[] {
                        new CAPI.KEY_USAGE_STRUCT("DigitalSignature", CAPI.CERT_DIGITAL_SIGNATURE_KEY_USAGE),
                        new CAPI.KEY_USAGE_STRUCT("NonRepudiation",   CAPI.CERT_NON_REPUDIATION_KEY_USAGE),
                        new CAPI.KEY_USAGE_STRUCT("KeyEncipherment",  CAPI.CERT_KEY_ENCIPHERMENT_KEY_USAGE),
                        new CAPI.KEY_USAGE_STRUCT("DataEncipherment", CAPI.CERT_DATA_ENCIPHERMENT_KEY_USAGE),
                        new CAPI.KEY_USAGE_STRUCT("KeyAgreement",     CAPI.CERT_KEY_AGREEMENT_KEY_USAGE),
                        new CAPI.KEY_USAGE_STRUCT("KeyCertSign",      CAPI.CERT_KEY_CERT_SIGN_KEY_USAGE),
                        new CAPI.KEY_USAGE_STRUCT("CrlSign",          CAPI.CERT_CRL_SIGN_KEY_USAGE),
                        new CAPI.KEY_USAGE_STRUCT("EncipherOnly",     CAPI.CERT_ENCIPHER_ONLY_KEY_USAGE),
                        new CAPI.KEY_USAGE_STRUCT("DecipherOnly",     CAPI.CERT_DECIPHER_ONLY_KEY_USAGE)
                    };

                    for (uint index = 0; index < KeyUsages.Length; index++) {
                        if (String.Compare(KeyUsages[index].pwszKeyUsage, (string) findValue, StringComparison.OrdinalIgnoreCase) == 0) {
                            pvCallbackData1 = KeyUsages[index].dwKeyUsageBit;
                            break;
                        }
                    }
                    if (pvCallbackData1 == null)
                        throw new CryptographicException(SR.GetString(SR.Cryptography_X509_InvalidFindType));
                } else if (findValue.GetType() == typeof(X509KeyUsageFlags)) {
                    pvCallbackData1 = findValue;
                } else if (findValue.GetType() == typeof(uint) || findValue.GetType() == typeof(int)) {
                    // We got the actual DWORD
                    pvCallbackData1 = findValue;
                } else
                    throw new CryptographicException(SR.GetString(SR.Cryptography_X509_InvalidFindType));

                pfnCertCallback1 = new FindProcDelegate(FindKeyUsageCallback);
                break;

            case X509FindType.FindBySubjectKeyIdentifier:
                if (findValue.GetType() != typeof(string))
                    throw new CryptographicException(SR.GetString(SR.Cryptography_X509_InvalidFindValue));
                pvCallbackData1 = (byte[]) X509Utils.DecodeHexString((string) findValue);
                pfnCertCallback1 = new FindProcDelegate(FindSubjectKeyIdentifierCallback);
                break;

            default:
                throw new CryptographicException(SR.GetString(SR.Cryptography_X509_InvalidFindType));
            }

            // First, create a memory store
            SafeCertStoreHandle safeTargetStoreHandle = CAPI.CertOpenStore(new IntPtr(CAPI.CERT_STORE_PROV_MEMORY),
                                                                           CAPI.X509_ASN_ENCODING | CAPI.PKCS_7_ASN_ENCODING,
                                                                           IntPtr.Zero,
                                                                           CAPI.CERT_STORE_ENUM_ARCHIVED_FLAG | CAPI.CERT_STORE_CREATE_NEW_FLAG,
                                                                           null);
            if (safeTargetStoreHandle == null || safeTargetStoreHandle.IsInvalid)
                throw new CryptographicException(Marshal.GetLastWin32Error());

            // FindByCert will throw an exception in case of failures.
            FindByCert(safeSourceStoreHandle,
                       dwFindType,
                       pvFindPara,
                       validOnly,
                       pfnCertCallback1,
                       pfnCertCallback2,
                       pvCallbackData1,
                       pvCallbackData2,
                       safeTargetStoreHandle);

            pb.Dispose();
            return safeTargetStoreHandle;
        }

#if FEATURE_CORESYSTEM
        [SecuritySafeCritical]
#endif
        private static void FindByCert(SafeCertStoreHandle safeSourceStoreHandle,
                                        uint dwFindType,
                                        IntPtr pvFindPara,
                                        bool validOnly,
                                        FindProcDelegate pfnCertCallback1,
                                        FindProcDelegate pfnCertCallback2,
                                        object pvCallbackData1,
                                        object pvCallbackData2,
                                        SafeCertStoreHandle safeTargetStoreHandle) {

            int hr = CAPI.S_OK;

            SafeCertContextHandle pEnumContext = SafeCertContextHandle.InvalidHandle;
            pEnumContext = CAPI.CertFindCertificateInStore(safeSourceStoreHandle,
                                                           CAPI.X509_ASN_ENCODING | CAPI.PKCS_7_ASN_ENCODING,
                                                           0,
                                                           dwFindType,
                                                           pvFindPara,
                                                           pEnumContext);

            while (pEnumContext != null && !pEnumContext.IsInvalid) {
                if (pfnCertCallback1 != null) {
                    hr = pfnCertCallback1(pEnumContext, pvCallbackData1);
                    if (hr == CAPI.S_FALSE) {
                        if (pfnCertCallback2 != null)
                            hr = pfnCertCallback2(pEnumContext, pvCallbackData2);

                        if (hr == CAPI.S_FALSE) // skip this certificate
                            goto skip;
                    }

                    if (hr != CAPI.S_OK)
                        break;
                }

                if (validOnly) {
                    hr = X509Utils.VerifyCertificate(pEnumContext,
                                           null,
                                           null,
                                           X509RevocationMode.NoCheck,
                                           X509RevocationFlag.ExcludeRoot,
                                           DateTime.Now,
                                           new TimeSpan(0, 0, 0), // default
                                           null,
                                           new IntPtr(CAPI.CERT_CHAIN_POLICY_BASE),
                                           IntPtr.Zero);
                    if (hr == CAPI.S_FALSE) // skip this certificate
                        goto skip;

                    if (hr != CAPI.S_OK)
                        break;
                }

                //
                // We use CertAddCertificateLinkToStore to keep a link to the original store, so any property changes get
                // applied to the original store. This has a limit of 99 links per cert context however.
                //

                if (!CAPI.CertAddCertificateLinkToStore(safeTargetStoreHandle,
                                                        pEnumContext,
                                                        CAPI.CERT_STORE_ADD_ALWAYS,
                                                        SafeCertContextHandle.InvalidHandle)) {
                    hr = Marshal.GetHRForLastWin32Error();
                    break;
                }

skip:
                // CertFindCertificateInStore always releases the context regardless of success
                // or failure so we don't need to manually release it
                GC.SuppressFinalize(pEnumContext);

                pEnumContext = CAPI.CertFindCertificateInStore(safeSourceStoreHandle,
                                                               CAPI.X509_ASN_ENCODING | CAPI.PKCS_7_ASN_ENCODING,
                                                               0,
                                                               dwFindType,
                                                               pvFindPara,
                                                               pEnumContext);
            }

            if (pEnumContext != null && !pEnumContext.IsInvalid)
                pEnumContext.Dispose();

            if (hr != CAPI.S_FALSE && hr != CAPI.S_OK)
                throw new CryptographicException(hr);
        }

        //
        // Callback method to find certificates by subject DN.
        //

#if FEATURE_CORESYSTEM
        [SecurityCritical]
#endif
        private static unsafe int FindSubjectDistinguishedNameCallback(SafeCertContextHandle safeCertContextHandle, object pvCallbackData) {
            string rdn = CAPI.GetCertNameInfo(safeCertContextHandle, 0, CAPI.CERT_NAME_RDN_TYPE);
            if (String.Compare(rdn, (string) pvCallbackData, StringComparison.OrdinalIgnoreCase) != 0)
                return CAPI.S_FALSE;
            return CAPI.S_OK;
        }

        //
        // Callback method to find certificates by issuer DN.
        //

#if FEATURE_CORESYSTEM
        [SecurityCritical]
#endif
        private static unsafe int FindIssuerDistinguishedNameCallback(SafeCertContextHandle safeCertContextHandle, object pvCallbackData) {
            string rdn = CAPI.GetCertNameInfo(safeCertContextHandle, CAPI.CERT_NAME_ISSUER_FLAG, CAPI.CERT_NAME_RDN_TYPE);
            if (String.Compare(rdn, (string) pvCallbackData, StringComparison.OrdinalIgnoreCase) != 0)
                return CAPI.S_FALSE;
            return CAPI.S_OK;
        }

        //
        // Callback method to find certificates by serial number.
        // This can be useful when using XML Digital Signature and X509Data.
        //

#if FEATURE_CORESYSTEM
        [SecurityCritical]
#endif
        private static unsafe int FindSerialNumberCallback(SafeCertContextHandle safeCertContextHandle, object pvCallbackData) {
            CAPI.CERT_CONTEXT pCertContext = *((CAPI.CERT_CONTEXT*) safeCertContextHandle.DangerousGetHandle());
            CAPI.CERT_INFO pCertInfo = (CAPI.CERT_INFO) Marshal.PtrToStructure(pCertContext.pCertInfo, typeof(CAPI.CERT_INFO));

            byte[] hex = new byte[pCertInfo.SerialNumber.cbData];
            Marshal.Copy(pCertInfo.SerialNumber.pbData, hex, 0, hex.Length);

            int size = X509Utils.GetHexArraySize(hex);
            byte[] serialNumber = (byte[]) pvCallbackData;
            if (serialNumber.Length != size)
                return CAPI.S_FALSE;

            for (int index = 0; index < serialNumber.Length; index++) {
                if (serialNumber[index] != hex[index])
                    return CAPI.S_FALSE;
            }

            return CAPI.S_OK;
        }

        //
        // Callback method to find certificates by validity time.
        // The callback data has to be a UTC FILETEME.
        //

#if FEATURE_CORESYSTEM
        [SecurityCritical]
#endif
        private static unsafe int FindTimeValidCallback(SafeCertContextHandle safeCertContextHandle, object pvCallbackData) {
            _FILETIME ft = (_FILETIME) pvCallbackData;
            CAPI.CERT_CONTEXT pCertContext = *((CAPI.CERT_CONTEXT*) safeCertContextHandle.DangerousGetHandle());
            if (CAPI.CertVerifyTimeValidity(ref ft, pCertContext.pCertInfo) == 0)
                return CAPI.S_OK;

            return CAPI.S_FALSE;
        }

        //
        // Callback method to find certificates expired at a certain DateTime.
        // The callback data has to be a UTC FILETEME.
        //

#if FEATURE_CORESYSTEM
        [SecurityCritical]
#endif
        private static unsafe int FindTimeNotAfterCallback(SafeCertContextHandle safeCertContextHandle, object pvCallbackData) {
            _FILETIME ft = (_FILETIME) pvCallbackData;
            CAPI.CERT_CONTEXT pCertContext = *((CAPI.CERT_CONTEXT*) safeCertContextHandle.DangerousGetHandle());
            if (CAPI.CertVerifyTimeValidity(ref ft, pCertContext.pCertInfo) == 1)
                return CAPI.S_OK;

            return CAPI.S_FALSE;
        }

        //
        // Callback method to find certificates effective after a certain DateTime.
        // The callback data has to be a UTC FILETEME.
        //

#if FEATURE_CORESYSTEM
        [SecurityCritical]
#endif
        private static unsafe int FindTimeNotBeforeCallback(SafeCertContextHandle safeCertContextHandle, object pvCallbackData) {
            _FILETIME ft = (_FILETIME) pvCallbackData;
            CAPI.CERT_CONTEXT pCertContext = *((CAPI.CERT_CONTEXT*) safeCertContextHandle.DangerousGetHandle());
            if (CAPI.CertVerifyTimeValidity(ref ft, pCertContext.pCertInfo) == -1)
                return CAPI.S_OK;

            return CAPI.S_FALSE;
        }

        //
        // Callback method to find certificates by template name.
        // The template name can have 2 different formats: V1 format (<= Win2K) is just a string
        // V2 format (XP only) can be a friendly name or an OID.
        // An example of Template Name can be "ClientAuth".
        //

#if FEATURE_CORESYSTEM
        [SecurityCritical]
#endif
        private static unsafe int FindTemplateNameCallback(SafeCertContextHandle safeCertContextHandle, object pvCallbackData) {
            IntPtr pV1Template = IntPtr.Zero;
            IntPtr pV2Template = IntPtr.Zero;

            CAPI.CERT_CONTEXT pCertContext = *((CAPI.CERT_CONTEXT*) safeCertContextHandle.DangerousGetHandle());
            CAPI.CERT_INFO pCertInfo = (CAPI.CERT_INFO) Marshal.PtrToStructure(pCertContext.pCertInfo, typeof(CAPI.CERT_INFO));

            pV1Template = CAPI.CertFindExtension(CAPI.szOID_ENROLL_CERTTYPE_EXTENSION,
                                                 pCertInfo.cExtension,
                                                 pCertInfo.rgExtension);
            pV2Template = CAPI.CertFindExtension(CAPI.szOID_CERTIFICATE_TEMPLATE,
                                                 pCertInfo.cExtension,
                                                 pCertInfo.rgExtension);

            if (pV1Template == IntPtr.Zero && pV2Template == IntPtr.Zero)
                return CAPI.S_FALSE;

            if (pV1Template != IntPtr.Zero) {
                CAPI.CERT_EXTENSION extension = (CAPI.CERT_EXTENSION) Marshal.PtrToStructure(pV1Template, typeof(CAPI.CERT_EXTENSION));
                byte[] rawData = new byte[extension.Value.cbData];
                Marshal.Copy(extension.Value.pbData, rawData, 0, rawData.Length);

                uint cbDecoded = 0;
                SafeLocalAllocHandle decoded = null;
                // Decode the extension.
                bool result = CAPI.DecodeObject(new IntPtr(CAPI.X509_UNICODE_ANY_STRING),
                                                rawData,
                                                out decoded,
                                                out cbDecoded);
                if (result) {
                    CAPI.CERT_NAME_VALUE pNameValue = (CAPI.CERT_NAME_VALUE) Marshal.PtrToStructure(decoded.DangerousGetHandle(), typeof(CAPI.CERT_NAME_VALUE));
                    string s = Marshal.PtrToStringUni(pNameValue.Value.pbData);
                    if (String.Compare(s, (string) pvCallbackData, StringComparison.OrdinalIgnoreCase) == 0)
                        return CAPI.S_OK;
                }
            }

            if (pV2Template != IntPtr.Zero) {
                CAPI.CERT_EXTENSION extension = (CAPI.CERT_EXTENSION) Marshal.PtrToStructure(pV2Template, typeof(CAPI.CERT_EXTENSION));
                byte[] rawData = new byte[extension.Value.cbData];
                Marshal.Copy(extension.Value.pbData, rawData, 0, rawData.Length);

                uint cbDecoded = 0;
                SafeLocalAllocHandle decoded = null;
                // Decode the extension.
                bool result = CAPI.DecodeObject(new IntPtr(CAPI.X509_CERTIFICATE_TEMPLATE),
                                                rawData,
                                                out decoded,
                                                out cbDecoded);
                if (result) {
                    CAPI.CERT_TEMPLATE_EXT pTemplate = (CAPI.CERT_TEMPLATE_EXT) Marshal.PtrToStructure(decoded.DangerousGetHandle(), typeof(CAPI.CERT_TEMPLATE_EXT));
                    // If we were passed the friendly name, retrieve the value string.
                    string oidValue = X509Utils.FindOidInfoWithFallback(CAPI.CRYPT_OID_INFO_NAME_KEY, (string)pvCallbackData, OidGroup.Template);
                    if (oidValue == null)
                        oidValue = (string) pvCallbackData;
                    if (String.Compare(pTemplate.pszObjId, oidValue, StringComparison.OrdinalIgnoreCase) == 0)
                        return CAPI.S_OK;
                }
            }

            return CAPI.S_FALSE;
        }

        //
        // Callback method to find certificates by application policy (also known as EKU)
        // An example of application policy can be: "Encrypting File System"
        //

#if FEATURE_CORESYSTEM
        [SecurityCritical]
#endif
        private static unsafe int FindApplicationPolicyCallback(SafeCertContextHandle safeCertContextHandle, object pvCallbackData) {
            string eku = (string) pvCallbackData;
            if (eku.Length == 0)
                return CAPI.S_FALSE;
            IntPtr pCertContext = safeCertContextHandle.DangerousGetHandle();
            int cNumOIDs = 0;
            uint cbOIDs = 0;
            SafeLocalAllocHandle rghOIDs = SafeLocalAllocHandle.InvalidHandle;
            if (!CAPI.CertGetValidUsages(1, new IntPtr(&pCertContext), new IntPtr(&cNumOIDs), rghOIDs, new IntPtr(&cbOIDs)))
                return CAPI.S_FALSE;

            rghOIDs = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(cbOIDs));
            if (!CAPI.CertGetValidUsages(1, new IntPtr(&pCertContext), new IntPtr(&cNumOIDs), rghOIDs, new IntPtr(&cbOIDs)))
                return CAPI.S_FALSE;

            // -1 means the certificate is good for all usages.
            if (cNumOIDs == -1)
                return CAPI.S_OK;

            for (int index = 0; index < cNumOIDs; index++) {
                IntPtr pszOid = Marshal.ReadIntPtr(new IntPtr((long) rghOIDs.DangerousGetHandle() + index * Marshal.SizeOf(typeof(IntPtr))));
                string oidValue = Marshal.PtrToStringAnsi(pszOid);
                if (String.Compare(eku, oidValue, StringComparison.OrdinalIgnoreCase) == 0)
                    return CAPI.S_OK;
            }

            return CAPI.S_FALSE;
        }

        //
        // Callback method to find certificates by certificate policy.
        // This is only recognized in XP platforms. However, passing in an OID value should work on downlevel platforms as well.
        //

#if FEATURE_CORESYSTEM
        [SecurityCritical]
#endif
        private static unsafe int FindCertificatePolicyCallback(SafeCertContextHandle safeCertContextHandle, object pvCallbackData) {
            string certPolicy = (string) pvCallbackData;
            if (certPolicy.Length == 0)
                return CAPI.S_FALSE;
            CAPI.CERT_CONTEXT pCertContext = *((CAPI.CERT_CONTEXT*) safeCertContextHandle.DangerousGetHandle());
            CAPI.CERT_INFO pCertInfo = (CAPI.CERT_INFO) Marshal.PtrToStructure(pCertContext.pCertInfo, typeof(CAPI.CERT_INFO));

            IntPtr pExtension = CAPI.CertFindExtension(CAPI.szOID_CERT_POLICIES,
                                                       pCertInfo.cExtension,
                                                       pCertInfo.rgExtension);
            if (pExtension == IntPtr.Zero)
                return CAPI.S_FALSE;

            CAPI.CERT_EXTENSION extension = (CAPI.CERT_EXTENSION) Marshal.PtrToStructure(pExtension, typeof(CAPI.CERT_EXTENSION));
            byte[] rawData = new byte[extension.Value.cbData];
            Marshal.Copy(extension.Value.pbData, rawData, 0, rawData.Length);

            uint cbDecoded = 0;
            SafeLocalAllocHandle decoded = null;
            // Decode the extension.
            bool result = CAPI.DecodeObject(new IntPtr(CAPI.X509_CERT_POLICIES),
                                            rawData,
                                            out decoded,
                                            out cbDecoded);
            if (result) {
                CAPI.CERT_POLICIES_INFO pInfo = (CAPI.CERT_POLICIES_INFO) Marshal.PtrToStructure(decoded.DangerousGetHandle(), typeof(CAPI.CERT_POLICIES_INFO));
                for (int index = 0; index < pInfo.cPolicyInfo; index++) {
                    IntPtr pPolicyInfoPtr = new IntPtr((long) pInfo.rgPolicyInfo + index * Marshal.SizeOf(typeof(CAPI.CERT_POLICY_INFO)));
                    CAPI.CERT_POLICY_INFO pPolicyInfo = (CAPI.CERT_POLICY_INFO) Marshal.PtrToStructure(pPolicyInfoPtr, typeof(CAPI.CERT_POLICY_INFO));
                    if (String.Compare(certPolicy, pPolicyInfo.pszPolicyIdentifier, StringComparison.OrdinalIgnoreCase) == 0)
                        return CAPI.S_OK;
                }
            }

            return CAPI.S_FALSE;
        }

        //
        // Callback method to find certificates that have a particular extension.
        // The callback data can be either an OID friendly name or value (all should be ANSI strings).
        //

#if FEATURE_CORESYSTEM
        [SecurityCritical]
#endif
        private static unsafe int FindExtensionCallback(SafeCertContextHandle safeCertContextHandle, object pvCallbackData) {
            CAPI.CERT_CONTEXT pCertContext = *((CAPI.CERT_CONTEXT*) safeCertContextHandle.DangerousGetHandle());
            CAPI.CERT_INFO pCertInfo = (CAPI.CERT_INFO) Marshal.PtrToStructure(pCertContext.pCertInfo, typeof(CAPI.CERT_INFO));

            IntPtr pExtension = CAPI.CertFindExtension((string) pvCallbackData,
                                                       pCertInfo.cExtension,
                                                       pCertInfo.rgExtension);
            if (pExtension == IntPtr.Zero)
                return CAPI.S_FALSE;

            return CAPI.S_OK;
        }

        //
        // Callback method to find certificates that have a particular Key Usage.
        // The callback data can be either a string (example: "KeyEncipherment") or a DWORD which can have multiple bits set in it.
        // If the callback data is a string, we can achieve the effect of a bit union by calling it multiple times, each time
        // further restricting the set of selected certificates.
        //

#if FEATURE_CORESYSTEM
        [SecurityCritical]
#endif
        private static unsafe int FindKeyUsageCallback(SafeCertContextHandle safeCertContextHandle, object pvCallbackData) {
            CAPI.CERT_CONTEXT pCertContext = *((CAPI.CERT_CONTEXT*) safeCertContextHandle.DangerousGetHandle());
            uint dwUsages = 0;
            if (!CAPI.CertGetIntendedKeyUsage(CAPI.X509_ASN_ENCODING | CAPI.PKCS_7_ASN_ENCODING,
                                              pCertContext.pCertInfo,
                                              new IntPtr(&dwUsages),
                                              4 /* sizeof(DWORD) */))
                return CAPI.S_OK; // no key usage means it is valid for all key usages.

            uint dwCheckUsage = Convert.ToUInt32(pvCallbackData, null);
            if ((dwUsages & dwCheckUsage) == dwCheckUsage)
                return CAPI.S_OK;

            return CAPI.S_FALSE;
        }

        //
        // Callback method to find certificates by subject key identifier.
        // This can be useful when using XML Digital Signature and X509Data.
        //

#if FEATURE_CORESYSTEM
        [SecurityCritical]
#endif
        private static unsafe int FindSubjectKeyIdentifierCallback(SafeCertContextHandle safeCertContextHandle, object pvCallbackData) {
            SafeLocalAllocHandle ptr = SafeLocalAllocHandle.InvalidHandle;
            // We look for the Key Id extended property
            // this will first look if there is a V3 SKI extension
            // and then if that fails, It will return the Key Id extended property.
            uint cbData = 0;
            if (!CAPI.CertGetCertificateContextProperty(safeCertContextHandle,
                                                        CAPI.CERT_KEY_IDENTIFIER_PROP_ID,
                                                        ptr,
                                                        ref cbData))
                return CAPI.S_FALSE;

            ptr = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(cbData));
            if (!CAPI.CertGetCertificateContextProperty(safeCertContextHandle,
                                                        CAPI.CERT_KEY_IDENTIFIER_PROP_ID,
                                                        ptr,
                                                        ref cbData))
                return CAPI.S_FALSE;

            byte[] subjectKeyIdentifier = (byte[]) pvCallbackData;
            if (subjectKeyIdentifier.Length != cbData)
                return CAPI.S_FALSE;

            byte[] hex = new byte[cbData];
            Marshal.Copy(ptr.DangerousGetHandle(), hex, 0, hex.Length);
            ptr.Dispose();

            for (uint index = 0; index < cbData; index++) {
                if (subjectKeyIdentifier[index] != hex[index])
                    return CAPI.S_FALSE;
            }

            return CAPI.S_OK;
        }

        private const uint X509_STORE_CONTENT_FLAGS                         =
                                       (CAPI.CERT_QUERY_CONTENT_FLAG_CERT |
                                        CAPI.CERT_QUERY_CONTENT_FLAG_SERIALIZED_CERT |
                                        CAPI.CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED |
                                        CAPI.CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED_EMBED |
                                        CAPI.CERT_QUERY_CONTENT_FLAG_PKCS7_UNSIGNED |
                                        CAPI.CERT_QUERY_CONTENT_FLAG_PFX |
                                        CAPI.CERT_QUERY_CONTENT_FLAG_SERIALIZED_STORE);

#if FEATURE_CORESYSTEM
        [SecuritySafeCritical]
#endif
        [ResourceExposure(ResourceScope.None)]
#if !FEATURE_CORESYSTEM
        [ResourceConsumption(ResourceScope.Machine, ResourceScope.Machine)]
#endif
        private unsafe static SafeCertStoreHandle LoadStoreFromBlob(byte[] rawData, string password, uint dwFlags, bool persistKeyContainers) {
            uint contentType = 0;
            SafeCertStoreHandle safeCertStoreHandle = SafeCertStoreHandle.InvalidHandle;
            if (!CAPI.CryptQueryObject(CAPI.CERT_QUERY_OBJECT_BLOB,
                                       rawData,
                                       X509_STORE_CONTENT_FLAGS,
                                       CAPI.CERT_QUERY_FORMAT_FLAG_ALL,
                                       0,
                                       IntPtr.Zero,
                                       new IntPtr(&contentType),
                                       IntPtr.Zero,
                                       ref safeCertStoreHandle,
                                       IntPtr.Zero,
                                       IntPtr.Zero))
                throw new CryptographicException(Marshal.GetLastWin32Error());

            if (contentType == CAPI.CERT_QUERY_CONTENT_PFX) {
                safeCertStoreHandle.Dispose();
                safeCertStoreHandle = CAPI.PFXImportCertStore(CAPI.CERT_QUERY_OBJECT_BLOB,
                                                              rawData,
                                                              password,
                                                              dwFlags,
                                                              persistKeyContainers);
            }

            if (safeCertStoreHandle == null || safeCertStoreHandle.IsInvalid)
                throw new CryptographicException(Marshal.GetLastWin32Error());

            return safeCertStoreHandle;
        }

#if FEATURE_CORESYSTEM
        [SecuritySafeCritical]
#endif
        [ResourceExposure(ResourceScope.Machine)]
#if !FEATURE_CORESYSTEM
        [ResourceConsumption(ResourceScope.Machine)]
#endif
        private unsafe static SafeCertStoreHandle LoadStoreFromFile(string fileName, string password, uint dwFlags, bool persistKeyContainers) {
            uint contentType = 0;
            SafeCertStoreHandle safeCertStoreHandle = SafeCertStoreHandle.InvalidHandle;
            if (!CAPI.CryptQueryObject(CAPI.CERT_QUERY_OBJECT_FILE,
                                       fileName,
                                       X509_STORE_CONTENT_FLAGS,
                                       CAPI.CERT_QUERY_FORMAT_FLAG_ALL,
                                       0,
                                       IntPtr.Zero,
                                       new IntPtr(&contentType),
                                       IntPtr.Zero,
                                       ref safeCertStoreHandle,
                                       IntPtr.Zero,
                                       IntPtr.Zero))
                throw new CryptographicException(Marshal.GetLastWin32Error());

            if (contentType == CAPI.CERT_QUERY_CONTENT_PFX) {
                safeCertStoreHandle.Dispose();
                safeCertStoreHandle = CAPI.PFXImportCertStore(CAPI.CERT_QUERY_OBJECT_FILE,
                                                              fileName,
                                                              password,
                                                              dwFlags,
                                                              persistKeyContainers);
            }

            if (safeCertStoreHandle == null || safeCertStoreHandle.IsInvalid)
                throw new CryptographicException(Marshal.GetLastWin32Error());

            return safeCertStoreHandle;
        }
    }

    public sealed class X509Certificate2Enumerator : IEnumerator {
        private IEnumerator baseEnumerator;

        private X509Certificate2Enumerator() {}
        internal X509Certificate2Enumerator(X509Certificate2Collection mappings) {
            this.baseEnumerator = ((IEnumerable) mappings).GetEnumerator();
        }

        public X509Certificate2 Current {
            get {
                return ((X509Certificate2)(baseEnumerator.Current));
            }
        }

        /// <internalonly/>
        object IEnumerator.Current {
            get {
                return baseEnumerator.Current;
            }
        }

        public bool MoveNext() {
            return baseEnumerator.MoveNext();
        }

        /// <internalonly/>
        bool IEnumerator.MoveNext() {
            return baseEnumerator.MoveNext();
        }

        public void Reset() {
            baseEnumerator.Reset();
        }

        /// <internalonly/>
        void IEnumerator.Reset() {
            baseEnumerator.Reset();
        }
    }
}

redpajama_set_name: RedPajamaGithub