Diff

Differences From Artifact [6206331092]:

To Artifact [5510d07f5c]:


  2822   2822   
  2823   2823   						break;
  2824   2824   					case CKO_NETSCAPE_TRUST:
  2825   2825   						CACKEY_DEBUG_PRINTF(" ... but not getting it because we are a Netscape trust object");
  2826   2826   
  2827   2827   						break;
  2828   2828   					case CKO_PUBLIC_KEY:
  2829         -						/* XXX: TODO */
         2829  +						if (certificate_len >= 0) {
         2830  +							x509_read_ret = x509_to_pubkey(certificate, certificate_len, &pValue);
         2831  +							if (x509_read_ret < 0) { 
         2832  +								pValue = NULL;
         2833  +							} else {
         2834  +								ulValueLen = x509_read_ret;
         2835  +							}
         2836  +						}
  2830   2837   
  2831   2838   						break;
  2832   2839   					case CKO_CERTIFICATE:
  2833   2840   						pValue = certificate;
  2834   2841   						ulValueLen = certificate_len;
  2835   2842   
  2836   2843   						break;