Changeset 78b8401 for lib/ssl_gnutls.c
- Timestamp:
- 2011-12-19T17:22:37Z (12 years ago)
- Branches:
- master
- Children:
- af5764e
- Parents:
- 486ddb5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/ssl_gnutls.c
r486ddb5 r78b8401 193 193 194 194 return verifyret; 195 } 196 197 char *ssl_verify_strerror( int code ) 198 { 199 GString *ret = g_string_new( "" ); 200 201 if( code & VERIFY_CERT_REVOKED ) 202 g_string_append( ret, "certificate has been revoked, " ); 203 if( code & VERIFY_CERT_SIGNER_NOT_FOUND ) 204 g_string_append( ret, "certificate hasn't got a known issuer, " ); 205 if( code & VERIFY_CERT_SIGNER_NOT_CA ) 206 g_string_append( ret, "certificate's issuer is not a CA, " ); 207 if( code & VERIFY_CERT_INSECURE_ALGORITHM ) 208 g_string_append( ret, "certificate uses an insecure algorithm, " ); 209 if( code & VERIFY_CERT_NOT_ACTIVATED ) 210 g_string_append( ret, "certificate has not been activated, " ); 211 if( code & VERIFY_CERT_EXPIRED ) 212 g_string_append( ret, "certificate has expired, " ); 213 if( code & VERIFY_CERT_WRONG_HOSTNAME ) 214 g_string_append( ret, "certificate hostname mismatch, " ); 215 216 if( ret->len == 0 ) 217 { 218 g_string_free( ret, TRUE ); 219 return NULL; 220 } 221 else 222 { 223 g_string_truncate( ret, ret->len - 2 ); 224 return g_string_free( ret, FALSE ); 225 } 195 226 } 196 227
Note: See TracChangeset
for help on using the changeset viewer.