<docbook><section><title>VirtTipsAndTricksGuideGetCertAttributes</title><title>How Can I Get certificate attributes using SPARQL?</title>How Can I Get certificate attributes using SPARQL?
<para>The SPARQL query should use the <emphasis>cert:hex</emphasis> and <emphasis>cert:decimal</emphasis> in order to get to the values, so for ex.:</para>
<para> </para>
<programlisting>PREFIX cert: &lt;http://www.w3.org/ns/auth/cert#&gt; 
PREFIX rsa: &lt;http://www.w3.org/ns/auth/rsa#&gt; 

SELECT ?webid 
FROM &lt;http://webid.myxwiki.org/xwiki/bin/view/XWiki/homepw4&gt;
WHERE 
  {
    [] cert:identity ?webid ;
             rsa:modulus ?m ;
     rsa:public_exponent ?e .
     ?m cert:hex &quot;b520f38479f5803a7ab33233155eeef8ad4e1f575b603f7780f3f60ceab1\n34618fbe117539109c015c5f959b497e67c1a3b2c96e5f098bb0bf2a6597\n779d26f55fe8d320de7af0562fd2cd067dbc9d775b22fc06e63422717d00\na6801dedafd7b54a93c3f4e59538475673972e524f4ec2a3667d0e1ac856\nd532e32bf30cef8c1adc41718920568fbe9f793daeeaeeaa7e8367b7228a\n895a6cf94545a6f6286693277a1bc7750425ce6c35d570e89453117b88ce\n24206afd216a705ad08b7c59\n&quot;^^xsd:string .
     ?e cert:decimal &quot;65537&quot;^^xsd:string
  }
</programlisting><para> </para>
<bridgehead class="http://www.w3.org/1999/xhtml:h3">Related</bridgehead>
<itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="VirtTipsAndTricksGuide">Virtuoso Tips and Tricks Collection</ulink> </listitem>
<listitem><ulink url="http://docs.openlinksw.com/virtuoso/rdfsparql.html">SPARQL</ulink> </listitem>
</itemizedlist></section></docbook>