Lines Matching refs:crt
69 gnutls_x509_crt_t crt; /* Self-signed certificate */ in cupsMakeServerCredentials() local
152 gnutls_x509_crt_init(&crt); in cupsMakeServerCredentials()
154 gnutls_x509_crt_set_dn_by_oid(crt, GNUTLS_OID_X520_COUNTRY_NAME, 0, in cupsMakeServerCredentials()
157 gnutls_x509_crt_set_dn_by_oid(crt, GNUTLS_OID_X520_COUNTRY_NAME, 0, in cupsMakeServerCredentials()
159 gnutls_x509_crt_set_dn_by_oid(crt, GNUTLS_OID_X520_COMMON_NAME, 0, in cupsMakeServerCredentials()
161 gnutls_x509_crt_set_dn_by_oid(crt, GNUTLS_OID_X520_ORGANIZATION_NAME, 0, in cupsMakeServerCredentials()
163 gnutls_x509_crt_set_dn_by_oid(crt, GNUTLS_OID_X520_ORGANIZATIONAL_UNIT_NAME, in cupsMakeServerCredentials()
165 gnutls_x509_crt_set_dn_by_oid(crt, GNUTLS_OID_X520_STATE_OR_PROVINCE_NAME, 0, in cupsMakeServerCredentials()
167 gnutls_x509_crt_set_dn_by_oid(crt, GNUTLS_OID_X520_LOCALITY_NAME, 0, in cupsMakeServerCredentials()
171 gnutls_x509_crt_set_key(crt, key); in cupsMakeServerCredentials()
172 gnutls_x509_crt_set_serial(crt, serial, sizeof(serial)); in cupsMakeServerCredentials()
173 gnutls_x509_crt_set_activation_time(crt, curtime); in cupsMakeServerCredentials()
174 gnutls_x509_crt_set_expiration_time(crt, curtime + 10 * 365 * 86400); in cupsMakeServerCredentials()
175 gnutls_x509_crt_set_ca_status(crt, 0); in cupsMakeServerCredentials()
177 gnutls_x509_crt_set_subject_alternative_name(crt, GNUTLS_SAN_DNSNAME, alt_names[0]); in cupsMakeServerCredentials()
178 gnutls_x509_crt_set_key_purpose_oid(crt, GNUTLS_KP_TLS_WWW_SERVER, 0); in cupsMakeServerCredentials()
179 gnutls_x509_crt_set_key_usage(crt, GNUTLS_KEY_KEY_ENCIPHERMENT); in cupsMakeServerCredentials()
180 gnutls_x509_crt_set_version(crt, 3); in cupsMakeServerCredentials()
183 if (gnutls_x509_crt_get_key_id(crt, 0, buffer, &bytes) >= 0) in cupsMakeServerCredentials()
184 gnutls_x509_crt_set_subject_key_id(crt, buffer, bytes); in cupsMakeServerCredentials()
186 gnutls_x509_crt_sign(crt, crt, key); in cupsMakeServerCredentials()
193 if ((result = gnutls_x509_crt_export(crt, GNUTLS_X509_FMT_PEM, buffer, &bytes)) < 0) in cupsMakeServerCredentials()
197 gnutls_x509_crt_deinit(crt); in cupsMakeServerCredentials()
211 gnutls_x509_crt_deinit(crt); in cupsMakeServerCredentials()
220 gnutls_x509_crt_deinit(crt); in cupsMakeServerCredentials()