continue;
}
+ if (first.size() > 8) {
+ fprintf(stderr,"Password should not be greater than 8 characters\nBecause only 8 valid characters are used - try again\n");
+ continue;
+ }
+
+ #ifdef HAVE_PWQUALITY
+ //the function return score of password quality
+ int r = check_passwd_pwquality(passwd);
+ if (r < 0){
+ printf("Password quality check failed, please set it correctly.\n");
+ continue;
+ }
+ #endif
+
passwd = getpassword("Verify:");
- if (passwd == NULL) {
+ if (passwd == nullptr) {
perror("getpass error");
exit(1);
}